Find Jobs
Hire Freelancers

Develop a Mac Application

$30-250 AUD

Fechado
Publicado há quase 9 anos

$30-250 AUD

Pago na entrega
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 do Projeto: 7511207

Sobre o projeto

Projeto remoto
Ativo há 9 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos

Sobre o cliente

Bandeira do(a) AUSTRALIA
Australia
0,0
0
Membro desde abr. 19, 2015

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.