Object-Oriented Programming · Citadel · Medium
Build a Battleship class from the ground up that lets two people set up their fleets via a command-line interface and then alternate firing shots at the opponent's grid. Alongside the class, write a program that consumes commands from standard input and emits results on standard output. The interview report only stated that the solution should be a class, driven from the terminal, with ships positioned by a coordinate plus a length, and with the two players taking turns;…