To play:
- Clone this repo.
- Edit the MyStrategy class (or create a new one) to be FirstLastStrategy (mine would be GregDickStrategy).
- Determine the placement of your pieces in your strategy class.
- Create your algorithm in the GetNextMove method of your strategy. You have access to a lot of information in the context, as well as some utility in the Util class.
- Email me your file. Do not create a pull request for it, or other people will see your strategy.
How to test your strategy:
You can run the main method in Program to test your strategy against boards with randomly placed ships. Your average number of moves to victory will be important for the main event as detailed below.
How it'll go down:
All strategies will be tested against 1000 boards with randomly placed ships. They will each receive a score that is their average number of moves to victory. This will seed the strategies into a tournament bracket.
After all strategies have been placed into the bracket, each match will pit the two strategies against each other where they will play a real game of battleship. This is where your ship placement will be used. The higher seeded strategy will get the first move.
The winner of the bracket will be declared the battleship champion.