示例#1
0
        public ResultModel AddBattleship(CoordinateModel startingCoord, CoordinateModel endingCoord)
        {
            var result = _gameService.AddBattleShip(startingCoord, endingCoord);

            if (!result)
            {
                return(new ResultModel
                {
                    Success = false,
                    Message = "Provided Battleship is not in a horizontal or vertical line."
                });
            }

            return(new ResultModel {
                Success = true
            });
        }