Skip to content

Commit

Permalink
Discover two Position getters: HalfMoveClock() int and `EnPassantSq…
Browse files Browse the repository at this point in the history
…uare() Square`
  • Loading branch information
bbars committed Jul 9, 2022
1 parent e9ff96c commit a640f72
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions position.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ func (pos *Position) Turn() Color {
return pos.turn
}

// HalfMoveClock returns the half-move clock (50-rule).
func (pos *Position) HalfMoveClock() int {
return pos.halfMoveClock
}

// EnPassantSquare returns the en-passant square.
func (pos *Position) EnPassantSquare() Square {
return pos.enPassantSquare
}

// CastleRights returns the castling rights of the position.
func (pos *Position) CastleRights() CastleRights {
return pos.castleRights
Expand Down

0 comments on commit a640f72

Please sign in to comment.