working GGS simulator in JS

This commit is contained in:
Jeena Paradies 2011-01-30 05:57:48 +01:00
parent a275990f62
commit 20a07dbd6a
8 changed files with 483 additions and 5 deletions

View file

@ -2,11 +2,32 @@
<html>
<head>
<title>Tic Tac Toe</title>
<script src="js/game.js"></script>
<script src="js/GameServer.js"></script>
<script src="js/GGS.js"></script>
<script src="js/TicTacToe.js"></script>
<script src="js/TicTacToeClient.js"></script>
<script>
var game_name ="tictactoe"
var GGS = new GGSI(game_name);
function init() {
GameServerI.addGame(game_name, main());
GameServerI.addClient(game_name, new TicTacToeClient(frames.player1.document.getElementById("p1"), GameServerI));
GameServerI.addClient(game_name, new TicTacToeClient(frames.player2.document.getElementById("p2"), GameServerI));
}
</script>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen">
</head>
<body onload="new TicTacToe('game')">
<div id="game"></div>
<p><a href="#" onclick="new TicTacToe('game'); return false;">New game</a></p>
</body>
<frameset cols="50%,50%" onload="init()">
<frame src="window1.html" name="player1">
<frame src="window2.html" name="player2">
<noframes>
<body>
<h1>Tic Tac Toe for Generic Game Server</h1>
<p>This simulator only works with frames.</p>
</body>
</noframes>
</frameset>
</html>