func InCheck(game *chess.Game) (bool, bool) {
	playerTurn := game.Position().Turn()
	moves := game.Moves()
	if len(moves) == 0 {
		return false, false
	}
	lastMove := moves[len(moves)-1]
	inCheck := lastMove.HasTag(chess.Check)
	if inCheck && playerTurn == chess.White {
		return true, false
	} else if inCheck {
		return false, true
	}
	return false, false
}
// InCheck returns two booleans indicating if either
// player is in check. The first boolean represents
// white and the second boolean represents black
InCheck returns two booleans indicating if either
player is in check. The first boolean represents
white and the second boolean represents black
// InCheck returns two booleans indicating if either // player is in check . The first boolean represents // white and the second boolean represents black
func InCheck(game *chess.Game) (bool, bool) {
	playerTurn := game.Position().Turn()
	moves := game.Moves()
	if len(moves) == 0 {
		return false, false
	}
	lastMove := moves[len(moves)-1]
	inCheck := lastMove.HasTag(chess.Check)
	if inCheck && playerTurn == chess.White {
		return true, false
	} else if inCheck {
		return false, true
	}
	return false, false
}
func InCheck ( game * chess . Game ) ( bool , bool ) { playerTurn := game . Position ( ) . Turn ( ) moves := game . Moves ( ) if len ( moves ) == 0 { return false , false } lastMove := moves [ len ( moves ) - 1 ] inCheck := lastMove . HasTag ( chess . Check ) if inCheck && playerTurn == chess . White { return true , false } else if inCheck { return false , true } return false , false }
InCheck returns two booleans indicating if either
player is in check.
InCheck returns two booleans indicating if either player is in check .