public Tuple <int, int> GetFirstPosition(Piece p) { for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { Piece currentPiece = _pieces[i, j]; if (_pieces[i, j] != null && currentPiece.GetType() == p.GetType() && currentPiece.ChessColor == p.ChessColor) { return(new Tuple <int, int>(i + 1, j + 1)); } } } return(null); }
private Pawn GetPawn(Piece p, int i, int j) { return new Pawn(((int)p.ChessColor) + p.GetType().Name, i + 1, j + 1); }