Skip to content
/ minimax Public

this repository contains a small website on which one can play against my minimax-algorithm in a tic-tac-toe.

Notifications You must be signed in to change notification settings

thibsy/minimax

Repository files navigation

Tic-Tac-Toe with Minimax-Algorithm

Installation

git clone [email protected]:thibsy/minimax.git ~/minimax
cd ~/minimax
open "$(pwd)/index.html"

Development

User interface

I'm a developer, I love dark-themes. That's why throughout this repository I've used the dark-themed colour-palette from Google's material design. Hence, all new UI elements should follow these colours.

Tic-Tac-Toe preview

Directories

   .
    ├── assets          contains assets like pictures and stylesheets.
    ├── dist            contains bundled files for the browser.
    ├── src             contains the javascript logic.
    └── test            contains the javascript unit tests.

This file can be considered the bootstrap file of the repository (or website), since I'm using rollup.js as a module-bundler. The configuration-file (rollup.config.js) will handle all imports in this file and bundle them together into one (minified) javascript file which will be sent to the browser.

This means, after each change one must re-bundle the bootstrap file in order for them to take effect:

npx rollup -c "rollup.config.js"

Testing

I'm also using mocha.js for some unit-testing, which helped me develop the algorithm itself a lot. The npm configuration is set up to execute all tests within test/ recursively when running npm test.

Specific tests can be executed with:

./node_modules/.bin/mocha "path/to/test"

or

./node_modules/.bin/mocha ./test -g "case-name or description"

About

this repository contains a small website on which one can play against my minimax-algorithm in a tic-tac-toe.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published