Welcome to the Battle-boats Game!!
- Program created by Rishi Selvakumaran (selva053) and Dylan Brandt (bran1198) on March 25 2020
How to play the game for beginners:
- In Repl, enter the following commands:
->cd src
->javac BattleBoatsGame.java
->java BattleboatsGame
-
Follow instructions while running the game
-
Have fun destroying the ships!
- The objective of this game is to destroy all the ships onboard within as few turns as possible.
The User has two modes to choose from:
-
Standard Mode
-
Expert mode
- If a user types in an option other than 1 or 2, they would be displayed invalid option.
The standard method consists of:
- 8x8 board
- 5 boats (Labelled as in numbers 0 to 4) {Our ships never overlap on top of each other}
- Powers limited to one drone and one missile and one time the coordinate will be displayed
The Expert method consists of:
- 12x12 board
- 10 boats (Labelled as in numbers 0 to 9) {Our ships never overlap on top of each other}
- Powers limited to two drones and two missiles and two times the ship coordinates will be displayed
-
At any point while playing the game, the user has the option to print the board or quit the game.
-
When attacking or launching the missile at the targeted ship, the user must type in the coordinates in this format: (0,0) where the 0’s represent the respective x and y coordinate that the user wishes to attack on.
Special Powers:
- Missile
-
The missile is a special power where the surrounding 3x3 coordinates on the board get attacked for the coordinate that the user has launched the missile on.
-
Example if the user has launched the missile on the (2,2) then the missile will destroy the ship coordinates at (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2), and (3,3).
- Drone
-
Drone is a special power where the user gets to scan the respective row or col by typing in r or c into the game, and the particular row or column that they wish to scan for target.
-
Typing in any other command would cause invalid input to be displayed until the user correctly types in the right command
-
The user has to be careful that the drone will also reveal an already hit and sunk ship coordinate as a target spot as well. Hence it is advised for the user to print the board for clarification
- Coordinations
-
If the user is really stuck on analyzing the coordinates of the ship, he/she/they could type in coordinates and request for the program to display the coordinates
-
Function can only be used once in standard and twice in Expert
Possible bugs:
-
When print function is called it prints the board twice, as after fulfilling the if condition the main method is run through that consists of the board print method call
-
After implementing drone feature and printing target spots the program generates an Invalid input statement. No need to panic for this one though!
Partner’s Work on Project:
Rishi:
- Game Class design; User input and setting up the command lines for user to type
- Coordinates method was done by Rishi
- Try and catch blocks were implemented by Rishi
- Fire method and missile method implementation and design was done by Rishi
- The getships method was designed and implemented by Rishi
Dylan:
- Initalising Board class with the checker board
- Designed the placing boats method
- Worked on 1/2 of placing ships method
- Drone method design was worked by Dylan
- Trouble shooting and debugging of the ships coordinate was done by Dylan