The game of Battleship is a classic game from the early 20th Century in which you try to guess the locations of your opponent’s ships in a grid.
You may be able to play Battleship online but do not waste much time doing that kind of research. Playing on paper is better for developing your understanding of what information needs to be tracked (the model).
Play battleship on paper to develop the model.
An example of how to use the model you defined.
Game logic, draw handler, mouse handler.