PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Amin   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: 13 years ago
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);