Find Jobs
Hire Freelancers

Write some Software

$10-30 USD

Скасований
Опублікований over 7 years ago

$10-30 USD

Оплачується при отриманні
Need to create Battleship Console application. There are some classes already per-written. Done Task Y Create class to represent coordinates on the board Y Create class for ships of different lengths with a ShipType enum Y Create class that given a ship type will return a properly sized ship Y Create class to represent the board Y Keep track of the shot history for the board Y Each shot fired will either be invalid, duplicate, hit, miss, hit and sunk, or victory if all ships are sunk. Create an enum to represent this. Y Create logic to place a ship on the board. Players will choose a coordinate, ship type, and direction (up/down/left/right). Ships may not overlap or run off the bounds of the board grid. NOT Done Tasks: -Create a start menu for the game, prompt for each player's name -Create an object that translates a number to its corresponding letter for the X coordinate (A=1, B=2, etc) -Create a game workflow object that will contain two boards, keep track of which player's turn it is, and process each player's turn. -The game should set up the boards. -Each player should be prompted to place their ships on their board by giving a starting coordinate and a direction. Clear the screen when a player is finished so the other player can't cheat! -A player's turn is as follows: 1. Show a grid with marks from the opponent board's shot history. Place a yellow M in a coordinate if a shot has been fired and missed at that location and a red H if a shot has been fired that has been hit. 2. Prompt the user for a coordinate entry (ex: B10) 3. Validate that the entry is valid, if so, create a coordinate object, convert the letter to a number, and call the opponent board's FireShot() method 4. Retrieve the response from the fire shot method and display an appropriate message to the user. Possible results are: a. Invalid coordinate - repeat turn b. Duplicate shot - repeat turn c. Hit - "You hit something!" - Next Player's turn d. Hit and Sunk - "You sank your opponent's {ship name}" - Next Player's turn e. Miss - "Your projectile splashes into the ocean, you missed!" - Next Player's turn f. Victory - "You have sunk all your opponent's ships, you win!" - End Game 5. Remember to prompt to continue and clear the screen to keep things clean N When the game ends, prompt the players if they would like to play again. If so, go back to setting up the boards. If not, quit the program.
ID проекту: 11960507

Про проект

2 пропозицій(-ї)
Дистанційний проект
Активність 8 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
2 фрілансерів(-и) готові виконати цю роботу у середньому за $25 USD
Аватарка користувача
I have done these kind of projects before. Can help u deliver on time
$20 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED STATES
Columbus, United States
5,0
1
Спосіб оплати верифіковано
На сайті з лист. 2, 2016

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.