// oo decides whether current conditions are such that the player can castle kingside.
oo decides whether current conditions are such that the player can castle kingside.
// oo decides whether current conditions are such that the player can castle kingside .
func (this *Game) oo(player player, king square) bool {
	if this.SquareIsCoveredBy(player.Other(), king) {
		return false
	}
	travelSquare := IntSquare(king.Int() + 1)
	if this.SquareIsCoveredBy(player.Other(), travelSquare) {
		return false
	}
	landingSquare := IntSquare(king.Int() + 2)
	if this.SquareIsCoveredBy(player.Other(), landingSquare) {
		return false
	}
	if this.anyOccupied(travelSquare, landingSquare) {
		return false
	}
	return true
}
func ( this * Game ) oo ( player player , king square ) bool { if this . SquareIsCoveredBy ( player . Other ( ) , king ) { return false } travelSquare := IntSquare ( king . Int ( ) + 1 ) if this . SquareIsCoveredBy ( player . Other ( ) , travelSquare ) { return false } landingSquare := IntSquare ( king . Int ( ) + 2 ) if this . SquareIsCoveredBy ( player . Other ( ) , landingSquare ) { return false } if this . anyOccupied ( travelSquare , landingSquare ) { return false } return true }
oo decides whether current conditions are such that the player can castle kingside.
oo decides whether current conditions are such that the player can castle kingside .