1) Overview
The BattleShip v1.0 was developed using Java. It is an online game where one user has to sink the other user’s ships. The game uses Server-Client structure, each user has a map where he needs to allocate his ships and one map where he will choose where to shoot to try to hit his enemy’s ships. The one who hit all opponent’s ships first, wins the game. The ships allocation can be manually or automatic (random position) and there is also a chat implemented where one user can talk to his opponent.
There are 5 types of ships:
• Patrol Boat – 2 positions;
• Submarine – 3 positions;
• Destroyer – 3 positions;
• Battleship – 4 positions;
• Aircraft carrier – 5 positions.
2) Ship Allocation
The first thing the user needs to do is allocating all ships. It can be done manually or automatically. After allocation is done or during allocation if the user wants to change any ship allocation he can press on the button “Clear Allocation” on the right side of the screen to reset the map.
2.1 Manually Allocation
The user needs to hover his mouse over his map and the map will highlights according to the ship’s position. When the user presses left mouse button the ship is placed to the respective mouse position. In case the user wants to change allocation position between horizontal and vertical, the user can press the right mouse button.
2.2 Automatically Allocation
The game has an automatic random position for the ships. The user needs to switch from “Manual Allocation” to “Automatic Allocation” on the right side of the screen and then press the button “New allocation”. If the user does not like the allocation suggested he can press the button again for a new one or switch back to manual mode.
3 Connection Configuration
The user can connect as a server or as a client. When the game is opened the IP address is already showed and the standard port is 9090. If the user is playing as a server he needs to start the connection and wait for a client to play. If the user is a client he needs to wait the server to be started up. The user can switch between Server and Client using the radio buttons on the connection panel.
When the client joins the game it will open a screen for the server where the player has to choose a number after the server chooses the number the same screen will open for the client. This window will work as a dice, to choose which player will start the game. If both (Server and Client) choose the same number it will show again until they have different numbers.
4 Chat
When the server is up and the client already joined the game the chat will be activated.
4 More Information
For more information you can visit our website http://www.rochacardoso.de.