Find Jobs
Hire Freelancers

Develop a Mac Application

$30-250 AUD

已关闭
已发布大约 9 年前

$30-250 AUD

货到付款
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
项目 ID: 7511207

关于此项目

远程项目
活跃9 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

AUSTRALIA的国旗
Australia
0.0
0
会员自4月 19, 2015起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。