Rules of the game:
- The game is be played on a 10x10 grid.
- Each competitor will place each of 5 ships (of lengths 2, 3, 3, 4, 5) on their grid.
- No ships may overlap, but they may be adjacent.
- The competitors then take turns firing single shots at their opponent.
- The opponent will notify the competitor if the shot sinks, hits, or misses.
- Game play ends when all of the ships of any one player are sunk.
- Match ends when one of the opponents reach 501 victories.
Rules of the competition:
- The spirit of the competition is to find the best Battleship algorithm.
- Anything that is deemed against the spirit of the competition will be grounds for disqualification.
- Interfering with an opponent (i.e. via reflection) is against the spirit of the competition.
- A limit of 4 second of CPU time per game is allotted to each competitor on the primary thread.
- Running out of time results in losing the current game.
- Any unhandled exception will result in losing the current game.
- Code should be posted on stack overflow as an answer, or, if too large, linked.
- Max total size (un-compressed) of an entry is 1 MB.
A. Your entry must implement the IBattleshipOpponent interface or must impement the protocol
defined by the OutOfProcessOpponent and communicate via the standard input and output