Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Amin Saeidi  >  Tic-Tac-Toe  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description:
Class: Tic-Tac-Toe
Tic-Tac-Toe game using alpha beta search algorithm
Author: By
Last change:
Date: 2010-11-15 12:40
Size: 273 bytes
 

Contents

Class file image Download
<?php
set_time_limit
(0);

require 
'Board.php';
require 
'TicTacToe.php';

$board explode(','$_POST['board']);
foreach (
$board as $key=>$b){
    
$board[$key] = intval($b);
}

$ttt = new TicTacToe();
$response $ttt->play($board);
echo 
json_encode($response);