Пример #1
0
        private static ShotResult HandleShot(Grid grid, TargetGrid targetGrid, OceanGrid oceanGrid)
        {
            Console.WriteLine("Call out your shot!");

            var shotCoordinate = new Coordinate(grid.Size, Console.ReadLine());
            var shotResult     = oceanGrid.TakeTheShot(shotCoordinate);

            targetGrid.MarkShot(new TargetGridMark(shotCoordinate, shotResult.Result));

            return(shotResult);
        }