Skip to content

Commit

Permalink
Merge branch 'bbars-position-getters'
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan Spears committed Aug 8, 2022
2 parents e9ff96c + a640f72 commit 6e59700
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 6e59700

Please sign in to comment.