Skip to content

ingles98/tictac-node

Repository files navigation

🕹 TicTac-Node ❌ | ⭕️ |

Version Documentation Maintenance License: TODO

More than just a tic tac toe game.

This project is more of a demo for code quality, readability, documentation, modularity and so on...

It includes a UI implementation that lets you play the game using command line, but by implementing ITicTacUI you're able to use this package to make a tictactoe webserver, or anything else really.

I intend on implementing an example of a web UI using Vue+Express and maybe multiplayer as well.

Tic Tac Toe is simple but there's many things you can work on using it as a foundation to train yourself.

Prerequisites

  • Node v15.2.1
  • NPM v7.0.8

Install

npm i git+https://github.com/ingles98/tictac-node

Usage

//examples/run_cli.ts

import TicTacNode from 'tictac-node'

while (true) {
    console.clear()

    const game = new TicTacNode.Core.TicTacToe(new TicTacNode.UI.CLI())
    game.start( TicTacNode.UI.CLI.promptBoolean("Versus AI?", undefined) )

    if (!TicTacNode.UI.CLI.promptBoolean("Start a new game?"))
        break
}

Run tests

(TODO: Actually implement tests)

Using JEST. I personally recommend using the vscode-jest extension on Visual Studio Code if you use it.

npm run test

Documentation

Everything (mostly?) is documented and the documentation has been generated to the docs folder.

Author

👤 Filipe Reis

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published