private Boolean isValidRookDirection(PieceMove.Directions dir) { return dir == PieceMove.Directions.N || dir == PieceMove.Directions.E || dir == PieceMove.Directions.S || dir == PieceMove.Directions.W; }
private Boolean isValidQueenDirection(PieceMove.Directions dir) { return dir != PieceMove.Directions.NNW && dir != PieceMove.Directions.NNE && dir != PieceMove.Directions.NEE && dir != PieceMove.Directions.NWW && dir != PieceMove.Directions.SEE && dir != PieceMove.Directions.SSE && dir != PieceMove.Directions.SWW && dir != PieceMove.Directions.SSW; }
private Boolean isValidKnightDirection(PieceMove.Directions dir) { return dir == PieceMove.Directions.NEE || dir == PieceMove.Directions.NNE || dir == PieceMove.Directions.NWW || dir == PieceMove.Directions.NNW || dir == PieceMove.Directions.SSW || dir == PieceMove.Directions.SWW || dir == PieceMove.Directions.SEE || dir == PieceMove.Directions.SSE; }
private Boolean isValidPawnDirection(PieceMove.Directions dir) { return (this.PieceColor == Color.Black && (dir == PieceMove.Directions.S || dir == PieceMove.Directions.SE || dir == PieceMove.Directions.SW)) || (this.PieceColor == Color.White && (dir == PieceMove.Directions.N || dir == PieceMove.Directions.NE || dir == PieceMove.Directions.NW)); }
private Boolean isValidKingDirection(PieceMove.Directions dir) { return dir == PieceMove.Directions.N || dir == PieceMove.Directions.E || dir == PieceMove.Directions.S || dir == PieceMove.Directions.W || dir == PieceMove.Directions.NW || dir == PieceMove.Directions.NE || dir == PieceMove.Directions.SW || dir == PieceMove.Directions.SE; }