Battleship game exercising socket programming with C