public void PlaceGamePiece(GamePiece gamePiece, BoardSquare boardSquare) { BoardSquare currentSquare = this.Board.Where(bs => bs == boardSquare).FirstOrDefault(); currentSquare.PlaceGamePiece(gamePiece); }
/// <summary> /// Returns gamesquare based on game pieces position (int). /// </summary> /// <param name="gamePiece"></param> /// <returns></returns> public BoardSquare GetCurrentSquare(GamePiece gamePiece) => Board.Where(b => b.BoardSquareNumber == gamePiece.BoardSquareNumber.Value).FirstOrDefault();