File: game.html

Recommend this page to a friend!
  Classes of Developer CK  >  JavaScript Tic Tac Toe  >  game.html  >  Download  
File: game.html
Role: Documentation
Content type: text/plain
Description: Documentation
Class: JavaScript Tic Tac Toe
Show a Tic Tac Toe board and process player moves
Author: By
Last change: Update game.html
Update game.html
Date: 6 months ago
Size: 3,298 bytes


Class file image Download
            Tic Toe
        <script src=""> </script>
            <script src="game.js">
        <style type="text/css">
            #contanier{ width:100%; height:100%; padding:10px; }
	    #gametable{ width:
            60%; height:300px; border-right: 1px #ccc solid; float: left; }
            float: left; width: auto; text-align: center;height:300px; }
	    .table{ } .table tr td{
				border: 1px: #ccc solid;           
				color: #333;
    <p> Just click on start!</p>
        <div id="container">
            <div id="gametable">
            <div id="controls">
                <input type="button" value="Start" id="start" onclick="start();" />
                <input type="button" value="Restart" id="restart" onclick="restart();"/>
        <script type="text/javascript">
            $(document).ready(function() {                    
	    function start(){
 "row":4,"bfn":function(){console.log('before move occurs')},"afn":function(){console.log('after move occurs')}});	
	    function restart() {
        <div id="overview">
        <h2>This is a tictoe game library.</h2>
        <h3>You can expand it according to your use.</h3>
        <p>Fucntion and properties are given below.</p>
        <p>Jquery required!.</p>
<li><a href="#col" >col : No. of Column for table(Default:6)</a></li>
<li><a href="#row" >row: No. of Row for Table(Default:7)</a></li>
<li><a href="matchCount" >matchCount: on which user said to winner: (Default:4)</a></li>
<li><a href="#id" >id: id of div where you want to show your table.(Default:gametable)</a></li>
<li><a href="bfn" >bfn: You can pass a function that will execute before every move</a></li>
<li><a href="afn" >afn: You can pass a function that  will execute after every move</a></li>

<li><a href="#init">init(): initialize tictoe</a></li>
<li><a href="#move">move(): when move happen </a></li>

<fieldset id="init">
 "bfn":function(){alert('before move occurs')},
 "afn":function(){alert('after move occurs')}

tt.init() for default;


<fieldset id="move">
 it takes current cell input element as an object