Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 541 Bytes

README.md

File metadata and controls

35 lines (29 loc) · 541 Bytes

TicTacToe API

PHP implementation of a TicTacToe game server.

Requirements

  • PHP 8.2+

Setup

  1. Clone the repository
  2. Install dependencies:
    composer install
  3. Start the Symfony server:
    symfony serve

Usage

Make a GET request to the root endpoint with a board state:

GET /?board=x++++++++

Board notation:

  • x: Player moves
  • o: Server moves
  • + or space: Empty position
  • Board is read left-to-right, top-to-bottom

Testing

Run tests with:

php bin/phpunit