I coded my own game of Battleships from scratch, where you can play against the computer. I'm still working on the computer's logic, but it sometimes wins! Here's how I did it.