}
		chessObj.refreshListOfGames();

    }
        
	</script>
</head>
<body>
<?php 
include "chess-board.class.php";
$chessBoard = new ChessBoard();
$chessBoard->setPgn('dgt.pgn');
$chessBoard->setCss(array('bgColor' => '#7fb2e5', 'bgColorPlayers' => '#53a6d7', 'bgColorMoves' => '#bcd2fe', 'bgColorClock' => '#95c1d5'));
$chessBoard->setJavascript(array('liveupdateinterval' => 15, 'serverFile' => 'chess.php', 'layout' => array('colorLightSquares' => '#e7f1fa', 'colorDarkSquares' => '#a2bdd9'), 'behaviour' => array('animationTime' => 0.3, 'autoplay' => array('delay' => 1)), 'listeners' => "{'loadgame' : showDetails, 'liveupdate' : receiveLiveUpdate, 'liveupdatenewmoves' : newMoves }"));
$chessBoard->write();
// Another method for adding listeners
// $chessBoard->addListeners("{'loadgame' : showDetails, 'liveupdate' : receiveLiveUpdate }");
?>

<h4>chess-board-class.php demo</h4>
<p>This is a demo of how you can create a chess board using the chess-board-class.php file. </p>
<p>Code used:</p>
<h5>Simple example</h5>
<p class="inline_code">
&lt;?php
include("chess-board.class.php");
$chessBoard = new ChessBoard();
$chessBoard->setPgn('pgn/live-games.pgn');
$chessBoard->write();