instructions are told in-game, and when you are setting up your boats click "r" to rotate
Most parts of the code were from Funut's battleship tutorial, I added some of my own code to perfect the AI algorithm.