<% authorGithubUsername = authorGithubUsername ? authorGithubUsername : "ingles98" -%> <% projectPrerequisites = projectPrerequisites && projectPrerequisites.length ? projectPrerequisites : [ {name: "Node", value: "v15.2.1"}, {name: "NPM", value: "v7.0.8"}, ] -%>
<% if (isProjectOnNpm) { -%> <% } -%> <% if (projectVersion && !isProjectOnNpm) { -%> <% } -%> <% if (projectPrerequisites) { -%> <% projectPrerequisites.map(({ name, value }) => { -%> <% }) -%> <% } -%> <% if (projectDocumentationUrl) { -%> <% } -%> <% if (isGithubRepos) { -%> <% } -%> <% if (licenseName) { -%> <% } -%> <% if (authorTwitterUsername) { -%> <% } -%>
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.
<% if (projectHomepage) { -%>
🏠 Homepage
<% } -%> <% if (projectDemoUrl) { -%>
✨ Demo
<% } -%> <% if (projectPrerequisites && projectPrerequisites.length) { -%>
<% projectPrerequisites.map(({ name, value }) => { -%>
- <%= name %> <%= value %> <% }) -%> <% } -%>
npm i git+https://github.com/ingles98/tictac-node
//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
}
(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
Everything (mostly?) is documented and the documentation has been generated to the docs
folder.
<% if (authorName || authorTwitterUsername || authorGithubUsername) { -%>
<% if (authorName) { %> 👤 <%= authorName %> <% } %> <% if (authorWebsite) { -%>
- Website: <%= authorWebsite %> <% } -%> <% if (authorTwitterUsername) { -%>
- Twitter: [@<%= authorTwitterUsername %>](https://twitter.com/<%= authorTwitterUsername %>) <% } -%> <% if (authorGithubUsername) { -%>
- GitHub: [@<%= authorGithubUsername %>](https://github.com/<%= authorGithubUsername %>) <% } -%> <% if (authorLinkedInUsername) { -%>
- LinkedIn: [@<%= authorLinkedInUsername %>](https://linkedin.com/in/<%= authorLinkedInUsername %>) <% } -%> <% } -%> <% if (issuesUrl) { -%>
Contributions, issues and feature requests are welcome!
Feel free to check issues page. <%= contributingUrl ? You can also take a look at the [contributing guide](${contributingUrl}).
: '' %>
<% } -%>