You all know the very famous Battleship game. Well, I hope so.
You must code a terminal version of this game. The two players are ONLY allowed to comunicate using the signals SIGUSER1 and SIGUSER2.
The map size is 8x8. On each turn, you must display your positions, and then your enemy’s positions.
At the end of the game (when all the ships of a player have been hit), you must display whether “I won” (and return 0) or “Enemy won” (and return 1).
See the subject for further details !
========================
Grade : C | Mark : 15.5
Category | Percentage | Tests | Crash ? |
---|---|---|---|
Basic signal | 100% | 2/2 | x |
Game | 75% | 6/8 | x |
Protocol | 75% | 3/4 | x |
Protocol - eval | 75% | 3/4 | x |
Rigor | 100% | 8/8 | x |
Rigor - eval | 100% | 8/8 | x |
End score | 88.1% | 30/34 | No |
Made with Quentin TREHEUX (LuciferBahamut)
Beware of -42 Epitech students !!!