Trey Arthur wrote a classic Battle Ships game. You have to battle against an AI.

http://www.gbadev.org/