PHP code example of lucidtaz / minimax

1. Go to this page and download the library: Download lucidtaz/minimax library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lucidtaz / minimax example snippets


class MyPlayer implements \lucidtaz\minimax\game\Player
{
    ...
}

class MyGameState implements \lucidtaz\minimax\game\GameState
{
    ...
}

$player = new MyPlayer(...);
$engine = new \lucidtaz\minimax\engine\Engine($player);

$gameState = new MyGameState(...);

$newGameState = $engine->decide($gameState);