A good old game of tic tac toe. Try your hand against our wonderful bot. MackRais MiniMax Bot v1.0. The bot uses the [Minimax Algorithm] to decide its moves. You can see it on [TicTacToe\User\MiniMaxBot]. You can try game here http://tic-tac-toe.mackrais.com
$ docker-compose build
$ docker-compose up -d
Start the project with composer:
$ composer install
After installing the packages, start PHP's built-in web server:
$ composer run --timeout=0 serve
You can then browse to http://127.0.0.1:4000
If you want to start the serve using port different of 4000, you can start the server manually:
$ php -S 0.0.0.0:_YOU_PORT_ -t public/
If you need Xdebug
$ composer run --timeout=0 serve-xdebug
{
"board": [
["O","O","X"],
[null,"X",null],
["X",null,"O"]
],
"game": { // if game not finished then null
"winner": "X",
"coordinates": [
[0,2],
[1,1],
[2,0]
]
},
"users": {
"bot": {
"userName": "MackRais MiniMax Bot v1.0",
"symbol": "O"
},
"player": { // if user not sign up yet then null
"userName": "Player",
"symbol": "X"
}
}
}