Battleships is a 2 players, 10x10 table based war game in which every player tries to shoot one another's ship.
Each player has the following setup:
- 1 Flagship (battle cruiser) takes up 5x rooms)
- 1 Minelayer ( takes up 2x rooms)
- 1 Destroyer ( takes up 4x rooms)
- 1 Frigate (takes up 3x rooms )
- 1 Submarine (takes up 3x rooms)
After each shot, shooting spot can be denoted by 2 different symbols 'X' and '*' (star).
The symbol "X" represents "miss", while "*" represents successful hit.
If the hit is successful, the player will keep shooting until he misses. When a shot is missed, other player takes the turn.
Game goes on until the one of the opponents has lost all of their ships.
It is not allowed to shoot at the same point twice, and it is also forbidden to change the spots of the ships during shooting.
The program will:
1. Place the ships that mentioned above, randomly on 10x10 matrix.
2. Coordinates of the ships must be unique, they should not collide.
3. User guesses must be in numbers between 1-10 and letters between A-J
- Enter your guess: 3A
- Enter your guess: 8L
Error: Invalid coordinates
4. If a ship gets hit, the program should output a message stating that a ship is hit or sunk. (ie. Submarine is hit, frigate is sunk etc)
5. Program should report to user after each shooting.
6. Program should terminate if the 'q' is pressed.
7. Program should report if the 'r' is pressed.
Sample report:
- You have made 22 shooting attempts.
- 1 Flagship ( + + + + + )
- 1 Minelayer ( + + )
- 1 Destroyer ( + + - - ) casualty
- 1 Frigate ( + - - ) casualty
- 1 Submarine ( - - - ) sunk
Sample run:
Enter your guess: 3B
[3B] Iska
A B C D E F G H I J
1 O O O O O O O O O O
2 O O O O O O O O O O
3 O X O O O O O O O O
4 O O O O O O O O O O
5 O O O O O O O O O O
6 O O O O O O O O O O
7 O O O O O O O O O O
8 O O O O O O O O O O
9 O O O O O O O O O O
10 O O O O O O O O O O
Enter your guess: 4E
[4E] Destroyer is hit
A B C D E F G H I J
1 O O O O O O O O O O
2 O O O O O O O O O O
3 O X O O O O O O O O
4 O O O * O O O O O O
5 O O O O O O O O O O
6 O O O O O O O O O O
7 O O O O O O O O O O
8 O O O O O O O O O O
9 O O O O O O O O O O
10O O O O O O O O O O
Enter your guess ? 4F
[4F]Destroyer is hit
A B C D E F G H I J
1 O O O O O O O O O O
2 O O O O O O O O O O
3 O X O O O O O O O O
4 O O O * * O O O O O
5 O O O O O O O O O O
6 O O O O O O O O O O
7 O O O O O O O O O O
8 O O O O O O O O O O
9 O O O O O O O O O O
10O O O O O O O O O O
Enter your guess ? 4F
You have made that move before. Please make another move.
Enter your guess ?
Deadline for the job is: 15th of January , 18:00 (GMT + 4)
Kind regards,
Jeremy
Hello,
I've written a C code for battleship game while I was in my freshman year, and it was a human-vs-computer game. So I am totally clear about the game logic, and I can guarantee to fulfil each of the requirements. If hired, I can provide it done in 24 hours or less. I am ready to start immediately, so I can perfectly finish this well before the deadline.
Thanks,
Sufian Latif
$88 USD en 1 día
0,0 (0 comentarios)
2,8
2,8
6 freelancers están ofertando un promedio de $118 USD por este trabajo
Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my Python and algorithm skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like to help you get this project done if you would give me the opportunity. I am a computer science professor and practitioner and this assignment is one of the fields that I teach very well so I can assure you an accurate result.
HI
Contact me for an efficient, well documented and perfect
solution and development of your project. I ensure quality
work with always on time delivery of project and dedicated
support and follow up.
Thanks
Farah Saif
Add My Skype id--lalagal4 please add more discuss
hire me----https://www.freelancer.com/u/ARIS11.html
Honey Sir, We would pair to get this possibleness of working with you.
We can indorse that you gift not rue your mind if you superior
us to fulfill this cast.