tests/lib/ludorum.js
/** The `quiescence(game, player, depth)` method is a stability test for the 
	given game state. If the game is quiescent, this function must return an 
	evaluation. Else it must return NaN or an equivalent value. 
	
	Final game states are always quiescent, and their evaluation is the game's
	result for the given player. This default implementation also return an 
	heuristic evaluation for every game state at a deeper depth than the 
	player's horizon.
	*/
The `quiescence(game, player, depth)` method is a stability test for the
given game state. If the game is quiescent, this function must return an
evaluation. Else it must return NaN or an equivalent value.

Final game states are always quiescent, and their evaluation is the game's
result for the given player. This default implementation also return an
heuristic evaluation for every game state at a deeper depth than the
player's horizon.
The ` quiescence ( game player depth ) ` method is a stability test for the given game state . If the game is quiescent this function must return an evaluation . Else it must return NaN or an equivalent value . Final game states are always quiescent and their evaluation is the game ' s result for the given player . This default implementation also return an heuristic evaluation for every game state at a deeper depth than the player ' s horizon .
function quiescence(game, player, depth) {
		var results = game.result();
		if (results) {
			return results[player];
		} else if (depth >= this.horizon) {
			return this.heuristic(game, player);
		} else {
			return NaN;
		}
	}
function quiescence ( game , player , depth ) { var results = game . result ( ) ; if ( results ) { return results [ player ] ; } else if ( depth >= this . horizon ) { return this . heuristic ( game , player ) ; } else { return NaN ; } }
The `quiescence(game, player, depth)` method is a stability test for the
given game state.
The ` quiescence ( game player depth ) ` method is a stability test for the given game state .