build/ludorum.js
/** The `display(ui)` method is called by a `UserInterface` to render the game state. The only 
	supported user interface type is `BasicHTMLInterface`. The look can be configured using CSS 
	classes.
	*/
The `display(ui)` method is called by a `UserInterface` to render the game state. The only
supported user interface type is `BasicHTMLInterface`. The look can be configured using CSS
classes.
The ` display ( ui ) ` method is called by a ` UserInterface ` to render the game state . The only supported user interface type is ` BasicHTMLInterface ` . The look can be configured using CSS classes .
function display(ui) {
		raiseIf(!ui || !(ui instanceof UserInterface.BasicHTMLInterface), "Unsupported UI!");
		var moves = this.moves(),
			activePlayer = this.activePlayer(),
			board = this.board;
		moves = moves && moves[activePlayer];
		var table = this.board.renderAsHTMLTable(ui.document, ui.container, function (data) {
				data.className = data.square === '.' ? 'ludorum-empty' : 'ludorum-player'+ data.square;
				data.innerHTML = data.square === '.' ? "&nbsp;" : "&#x25CF;";
				var i = data.coord[0] * board.height + data.coord[1];
				if (moves && moves.indexOf(i) >= 0) {
					data.move = i;
					data.activePlayer = activePlayer;
					data.onclick = ui.perform.bind(ui, data.move, activePlayer);
				}
			});
		return ui;
	}
function display ( ui ) { raiseIf ( ! ui || ! ( ui instanceof UserInterface . BasicHTMLInterface ) , "Unsupported UI!" ) ; var moves = this . moves ( ) , activePlayer = this . activePlayer ( ) , board = this . board ; moves = moves && moves [ activePlayer ] ; var table = this . board . renderAsHTMLTable ( ui . document , ui . container , function ( data ) { data . className = data . square === '.' ? 'ludorum-empty' : 'ludorum-player' + data . square ; data . innerHTML = data . square === '.' ? "&nbsp;" : "&#x25CF;" ; var i = data . coord [ 0 ] * board . height + data . coord [ 1 ] ; if ( moves && moves . indexOf ( i ) >= 0 ) { data . move = i ; data . activePlayer = activePlayer ; data . onclick = ui . perform . bind ( ui , data . move , activePlayer ) ; } } ) ; return ui ; }
The `display(ui)` method is called by a `UserInterface` to render the game state.
The ` display ( ui ) ` method is called by a ` UserInterface ` to render the game state .