func (this *Game) ooo(player player, king square) bool {
	if this.SquareIsCoveredBy(player.Other(), king) { // in check
		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
	}

	rookTravelSquare := IntSquare(king.Int() - 3)
	if this.anyOccupied(travelSquare, landingSquare, rookTravelSquare) {
		return false
	}

	return true
}
// oo decides whether current conditions are such that the player can castle queenside.
oo decides whether current conditions are such that the player can castle queenside.
// oo decides whether current conditions are such that the player can castle queenside .
func (this *Game) ooo(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
	}
	rookTravelSquare := IntSquare(king.Int() - 3)
	if this.anyOccupied(travelSquare, landingSquare, rookTravelSquare) {
		return false
	}
	return true
}
func ( this * Game ) ooo ( 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 } rookTravelSquare := IntSquare ( king . Int ( ) - 3 ) if this . anyOccupied ( travelSquare , landingSquare , rookTravelSquare ) { return false } return true }
oo decides whether current conditions are such that the player can castle queenside.
oo decides whether current conditions are such that the player can castle queenside .
// in check