Find Jobs
Hire Freelancers

Develop a Mac Application

$30-250 AUD

Closed
Posted about 9 years ago

$30-250 AUD

Paid on delivery
write an Objective C command line program that runs a puzzle game called slider. The puzzle consists of an n row ´ m column grid filled with the numbers starting at 1 in ascending order. Each vertical column in the puzzle is numbered 0 through to m-1 and the horizontal rows are numbered 0 to n-1. The program uses two command line arguments. The first argument is the number of rows and the second is the number of columns. For example slider 3 4 will produce the following output m : print this menu p : print the puzzle sX : scramble puzzle. X is the puzzle seed rX : shift row X right cX : shift col X down x : exit the program 0 | 1 2 3 4 1 | 5 6 7 8 2 | 9 10 11 12 --+------------- | 0 1 2 3 DETAILS Starting the program: The number of columns and rows must each be greater than 0 and less than 10. Failure to enter correct puzzle size at the command line will result in slider printing a syntax message about how the program is to be used. Menu items: Once the program is running the following menu options are available. cX where X represents the column number. This will move each number in the column down one square. The square at the bottom will be moved to the top. rX where X represents the row number. This will move each number in the row right one square. The square at the right will be placed in the left most square. sX This command will randomly scramble the puzzle, using X as a seed to the random number generator. See details below for scrambling the puzzle. p Will print the puzzle grid m will print these instructions x will exit the program. Examples of moving rows and columns: 0 | 1 2 3 4 1 | 5 6 7 8 2 | 9 10 11 12 --+------------- | 0 1 2 3 Enter command => r1 0 | 1 2 3 4 1 | 8 5 6 7 2 | 9 10 11 12 --+------------- | 0 1 2 3 Enter command => c2 0 | 1 2 11 4 1 | 8 5 3 7 2 | 9 10 6 12 --+------------- | 0 1 2 3
Project ID: 7511207

About the project

Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of AUSTRALIA
Australia
0.0
0
Member since Apr 19, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.