- API supports NxN grids
- Implemented 2 types of bots, clueless and unbeatable
- Used docker-compose to create integrated environment, projects are however completely separate entities
- Used latest version of the PHP (7.1.7)
- Used ES15 for the front-end with the babel and browserify
- PHPUnit for the functional as well as unit tests
- Standards used PSR-1, PSR-2, PSR-4, PSR-7
- docker 17+
- docker-compose 1.14
npm
- to build front-end
Build containers
docker-compose build
Run the containers
docker-compose up
Install API dependencies
docker exec -it ttt-api-php composer install
- this step is optional because
bundle.js
is already provided and integrated with the nginx
Install front-end dependencies
cd ttt-front
npm install
Run development server
npm run start
Build Dependencies
npm run build
docker exec -it ttt-api-php bin/phpunit
Access project in the browser
- http://localhost:8888/ - front-end UI
- http://localhost:8888/api/ - API
For additional details see README.md in the ttt-api
and ttt-front
folders
- Better UI (highlight winning line, possibility to choose AI level, support for the NxN grids)
- More robust API (validation, configurable, speed up minimax, medium intensity AI level)
- Support 2 players or switching of the bots
- Front-end tests are missing
- Front-end could use some reactive framework to simplify logic drastically
- Integrate with the CI/CD tools to report on test coverage and deploy automatically