tests/lib/ludorum.js
/** If the given state has no entry in this cache, `entry(state, id)` builds
	a new entry, adds it to this cache and returns it. If the state is already
	cached, its entry is returned.
	Every entry has the game `state`, its `id`, the states that may come before
	(the `precursors`) and the states that may follow (the `descendants`).
	*/
If the given state has no entry in this cache, `entry(state, id)` builds
a new entry, adds it to this cache and returns it. If the state is already
cached, its entry is returned.
If the given state has no entry in this cache ` entry ( state id ) ` builds a new entry adds it to this cache and returns it . If the state is already cached its entry is returned .
function entry(state, id) {
		id = id || this.stateIdentifier(state);
		if (this.has(id)) {
			return this.get(id);
		} else {
			var _entry = { id: id, state: state, precursors: [], descendants: {} };
			this.__entries__[id] = _entry;
			return _entry;
		}
	}
function entry ( state , id ) { id = id || this . stateIdentifier ( state ) ; if ( this . has ( id ) ) { return this . get ( id ) ; } else { var _entry = { id : id , state : state , precursors : [ ] , descendants : { } } ; this . __entries__ [ id ] = _entry ; return _entry ; } }
If the given state has no entry in this cache, `entry(state, id)` builds
a new entry, adds it to this cache and returns it.
If the given state has no entry in this cache ` entry ( state id ) ` builds a new entry adds it to this cache and returns it .