Giter Club home page Giter Club logo

tictactoe_myob19's Introduction

TIC TAC TOE

FMA Application by Eathan Langford.

Setting up the app

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

What I used

  • JavaScript
  • Node.JS
  • Chalk
  • Clear
  • Figlet
  • Lodash
  • Mocha
  • Readline-Sync

About

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.

My Challenges

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!

Assumptions

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.