public IGridSquare Shoot(GridCoordinate coordinate) { /* Check if the coordinate is out of bound. */ if (coordinate.IsOutOfBounds(Size) == false) { /* Call the HitByBomb method of the grid square.*/ this.Squares[coordinate.Row, coordinate.Column].HitByBomb(); return(this.Squares[coordinate.Row, coordinate.Column]); } else { /* Return exception when coordinate is not with the grid.*/ throw new System.ApplicationException("Coordinate is out of bound"); } }
public IGridSquare GetSquareAt(GridCoordinate coordinate) { /* Return the grid square with the requested coordinates. */ return(this.Squares[coordinate.Row, coordinate.Column]); }
public IGridSquare GetSquareAt(GridCoordinate coordinate) { return(this.Squares[coordinate.Row, coordinate.Column]); }
public IGridSquare Shoot(GridCoordinate coordinate) { throw new NotImplementedException("Shoot method of Grid class is not implemented"); }
public GridSquare(GridCoordinate coordinate) { this.Coordinate = coordinate; }
public GridSquare(GridCoordinate coordinate) { throw new NotImplementedException("Constructor of GridSquare class is not implemented"); }
public GridSquare(GridCoordinate coordinate) { Status = GridSquareStatus.Untouched; Coordinate = coordinate; NumberOfBombs = 0; }