Clone to your local drive:
$ git clone https://github.com/EathanLangford/TicTacToe_myob19.git
$ cd TicTacToe_myob19
Then install the dependencies:
$ npm i
Start the app by using:
$ npm start
Start the testing by using:
$ npm test
- JavaScript
- Node.JS
- Chalk
- Clear
- Figlet
- Lodash
- Mocha
- Readline-Sync
I chose to use the JavaScript language. It is a language that i worked with most recently in my education and in my recent employment.
I chose Node specifically because in my research looking at interacting with the CLI, NPM offered more packages that allowed me to have fun with it.
I used Chalk, Clear and Figlet just for jazzing it up a little.
I chose Lodash to use, because it seemed to solve my challenge with setting an Object property by parsing a string.
I used Readline-Sync so i was able to use the user input synchronously within my code.
There were many things in this project that i considered a challenge.
I purposely didn't look at any attempts at writing Tic-Tac-Toe in any language, as I really wanted to see what I could come up with without influence. I am excited to discuss different approaches.
I hadn't learnt Test Driven Development or had much testing experience in my recent education.
I initially tried to approach the project with a TDD mindset, but found the learning involved before planning my approach to be too much of a blocker.
Rather than keep going, i tried to implement the idea behind it. The approach i took to building this, was to write the quickest code to get it up and working. I then looked at each function, broke them down and introduced validation.
This was repeated many times until i had functions that i could test seperately.
I chose to split the functions that run the game into almost a back-end solution, forming the 'mechanics' behind the game.
Coming from a design background, i tried to implement a little entertainment and character where i could.
Given more time, I'd like to refactor further and write more tests. As testing was only a new practice for me, it was definitely a challenge both to execute and within a good time. I also was experimenting was different variable declarations and between written functions and using arrow functions. Given more time, i would clean it up and stick with one way.
I do wish I had commited way earlier, and more often. I was so caught up it completely slipped my mind honestly. If i could do it again, i would work more effeciently on branches and commiting from the start.
All in all, this was a very fun albeit sometimes frustrating experience!
I would love to hear any feedback, so i can improve on this as much as possible!
Thank you so much for your time, I hope you enjoy it!
I assumed:
- Player would know it was a 3*3 grid.
- It would be played to be reviewed.
- Player has knowledge of Tic-Tac-Toe
- Instructions were clear enough.