Find Jobs
Hire Freelancers

Battleship game (JAVA)

€8-30 EUR

完了済み
投稿日: 10年近く前

€8-30 EUR

完了時にお支払い
JAVA (OBJECT ORIENTATION) Implement the classic game of Battleship, which allows a human player (user) to face the computer (CPU player). 1. Review The game is played on two grids, one for each player. The grids are typically square – usually 10×10 – and the individual squares in the grid are identified by letter and number Before play begins, each player secretly arranges their ships on their grid. Each ship occupies a number of consecutive squares on the grid, arranged either horizontally or vertically. The number of squares for each ship is determined by the type of the ship. The types and numbers of ships allowed are the same for each player. There are two typical complements of ships: Type of ship Size Number per player aircraft carrier 5 1 battleship 4 2 frigate 3 2 submarine 2 2 The application will ask to the user to specify the location where he wants to place the ships, and will verify that the position of the ships is correct. The ships cannot overlap (i.e., only one ship can occupy any given square in the grid) and a ship cannot “touch” another ship. If the position of the ships is not correct, the application will ask the player to specify the ships location again. After the ships have been positioned by the user, the application will randomly set the location of the CPU player ships. The game proceeds in a series of rounds. User goes first, and the application will ask the user a grid (ie (2, 5)). If he hits his shoot, he will shoot again (successively). If he misses, his round is over. In the CPU player round, the application will generate a random grid and if it is a hit, the CPU will shoot again. The next shoot will be the grid on top of the previous hit, the grid on the right of the previous hit, the grid at the bottom of the previous hit, and the grid on the left of the previous hit. IN THAT ORDER. ie, if (3,5) is a hit, the next shoot will be (2,5). If it is another hit, next shoot will be (1, 5), and the CPU will look for the ship up and down. But if (2, 5) was a miss, the next shoot will be (3,6) and the CPU will look for the ship right and left. If (3,6) was a miss, the next shoot will be (4,5) and if (4,5) is a miss, the next shoot will be (3,4) When all of the squares of a ship have been hit, the ship is sunk, if all of a player's ships have been sunk, the game is over and their opponent wins. The application has to implement a mechanism to leave the game if the user doesn’t want to keep playing. 2. Application Restrictions [...] Read the attached file [...] 3. Delivery The application will be coded in Java. Be warned that you must use the characteristics of the programming language (object orientation, inheritance ,etc .). Using the Java language in a “Unnatural" way (ie, using Java to use an imperative programming) is not allowed and the project will be rejected. You have to send a zip file which includes all source code files needed to execute the application and a text file with a detailed description of the main algorithms and structure of the application. **Further information will be sent to the developer**
プロジェクト ID: 5853670

プロジェクトについて

4個の提案
リモートプロジェクト
アクティブ 10年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
I am oracle certified professional java programmer and have done this game before for another client, I am ready to modify it for you, thanks
€28 EUR 2日以内
5.0 (65 レビュー)
5.3
5.3
この仕事に4人のフリーランサーが、平均€22 EURで入札しています
ユーザーアバター
Hi there, We're 4 senior developers who have over 100 completed projects and were qualified by this site (you can see all information on our profile page). Btw, could you please share me more details? I'll check and let you know my estimate time and effort for this task. Thanks and best regards, Duc Nguyen
€24 EUR 1日以内
4.9 (92 レビュー)
5.6
5.6
ユーザーアバター
Added Me Skype---------silakot09----------For More Details or Hire me----https://www.freelancer.com/u/sitaplo.html
€13 EUR 1日以内
0.0 (0 レビュー)
0.0
0.0
ユーザーアバター
hi. i am prasanna and i have done various projects in java swing, struts and MVc for websites in odesk, elance...and i would like to help this project.. Thank you CONTACT ME
€24 EUR 1日以内
0.0 (1 レビュー)
0.0
0.0

クライアントについて

SPAINのフラグ
Murcia, Spain
4.5
11
お支払い方法確認済み
メンバー登録日:2月 19, 2014

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。