I··C··D··O··T··S (––and––lines––)
I··C··D··O··T··S··: A Web App Game
tl;dr - take me to the game already!
ICDots is a board game for 2-7 players who will take turns selecting lines to form boxes.
Scoring is 1 point per box pinned.
Line colors have no distinction other than one is horizontal and one is vertical,
and the alternating colors felt visually appealing.
Game Reference
- Wikipedia (Game: Dots and Boxes): https://en.wikipedia.org/wiki/Dots_and_Boxes
The Game:
- Board is between 2 and 7 (represented as 1 row of boxes).
- Number of players is between 2 and [Board] size.
- Players take turns.
- If a player pins a box, they go again.
Application URLs
- - React Version (working demo)
- - GitHub Pages
- - Process Flowchart
- - My JavaScript Prototypal Inheritance Version
Technology History
- Inspired by a Codewars kata, the original kata solution was written with just JavaScript.
- In making the game interactive, the first version of ICDots was written with JavaScript Prototypal Inheritance
(e.g.,
let myGame = new Game()
andGame.prototype.createBoard = function() { }
). This was my first prototype-based coding project. - I then converted that version of the game to React with TypeScript. With this project, I added TypeScript alongside/during the conversion to React (as it should be done).
Tech Stack
Working on this project provided me a more in-depth look into- - JavaScript (ES5, ES2015 (ES6)) (+ downgrading ES7
.includes()
) - - React (16.2.0)
- - TypeScript (2.13.0)
- - Local component state and props
Tags
[JavaScript] [react] [reactjs] [typescript] [coding practice] [coding fun]
Comments
Post a Comment
Comments are typically approved within an hour or two of posting.