PHP Classes

File: index.html

Recommend this page to a friend!
  Classes of Amin   Tic-Tac-Toe   index.html   Download  
File: index.html
Role: Auxiliary data
Content type: text/plain
Description: example
Class: Tic-Tac-Toe
Tic-Tac-Toe game using alpha beta search algorithm
Author: By
Last change: Bug fix in IE.
Date: 12 years ago
Size: 1,154 bytes
 

Contents

Class file image Download
<html> <head> <title>Tic-Tac-Toe</title> <script type="text/javascript" src="libs/jquery-1.4.2.js"></script> <script type="text/javascript" src="libs/raphael-min.js"></script> <script type="text/javascript" src="libs/TicTacToe.js"></script> <script type="text/javascript" src="libs/Position.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#debug').ajaxStart(function(){ $(this).html('Thinking...'); }).ajaxStop(function(){ $(this).html('Done'); }); //Second parameter can be passed to TicTacToe constructor to change default properties: //e.g. var ttt = new TicTacToe('board', {size:600, stroke_width: 4}); var ttt = new TicTacToe('board'); if (Const.TURN == Const.COM) { ttt.post(); }else{ $('#debug').html('It is your turn. Please start the game!'); } }); </script> <style type="text/css"> html, body{ padding: 0; text-align: center; } #board, #debug{ margin: 10px auto; } </style> </head> <body> <div id="debug" style="height: 40px; width 100%; background-color: #FFF;text-align:center; font-size:20pt;padding:10px"></div> <div id="board"></div> </body> </html>