src/games/TicTacToe.js
/** The active player's `moves()` are the indexes of empty squares in the board.
	*/
The active player's `moves()` are the indexes of empty squares in the board.
The active player ' s ` moves () ` are the indexes of empty squares in the board .
function moves() {
		if (!this.result()) {
			var result = {};
			result[this.activePlayer()] = iterable(this.board).filter(function (chr, i) {
				return chr === '_'; 
			}, function (chr, i) {
				return i; 
			}).toArray();
			return result;
		} else {
			return null;
		}		
	}
function moves ( ) { if ( ! this . result ( ) ) { var result = { } ; result [ this . activePlayer ( ) ] = iterable ( this . board ) . filter ( function ( chr , i ) { return chr === '_' ; } , function ( chr , i ) { return i ; } ) . toArray ( ) ; return result ; } else { return null ; } }
The active player's `moves()` are the indexes of empty squares in the board.
The active player ' s ` moves () ` are the indexes of empty squares in the board .
// Keep only empty squares. // Grab the index.