gonza4 / tic-tac-toe-sdk-php
Api clietn to play Tic Tac Toe
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/gonza4/tic-tac-toe-sdk-php
This package is not auto-updated.
Last update: 2025-12-21 12:14:57 UTC
README
A PHP library to play Tic Tac Toe through the Tic Tac Toe API.
Requirements
PHP 5.6 and later.
Composer
You can install the SDK via Composer. Run the following command:
composer require gonza4/tic-tac-toe-sdk-php
To use the SDK, use Composer's autoload:
require_once('vendor/autoload.php');
Dependencies
The SDK require the following extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
Getting Started
Simple usage looks like:
- Create a instance of the TicTacToe Client
$tictactoe = new \Gonza4\TicTacToe();
- Generate empty board
$result = $tictactoe->getEmptyBoard(); var_dump($result);
- Make a move
$result = $tictactoe->postPlayGame(1); var_dump($result);