Skip to content

colour matching, colour smashing, block game. yay!

Notifications You must be signed in to change notification settings

disintegrator/blocky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blocky Puzzle

To get started

npm i
# or yarn
npm start
# or yarn start

http://localhost:9100/ will open automatically on the blocky app, live-reloading as you develop.

yarn test & yarn test:watch to run the unit tests on the terminal.

Task

Implement blockClicked to remove (or hide) all blocks of the same colour that are connected to the target element, then allow the blocks above the removed to "fall down" (similar to Tetris but you should click a block to have connected blocks removed).

E.g.,

Given:

Initial state

After clicking one of the bottom right blue boxes it should then look like this:

state 2

Decisions/Assumptions

  • Switched to using chance.js and passing it to BlockGrid at construction time to make it more easily testable. As a result, it can generate grids deterministically as seen grid.test.js.

About

colour matching, colour smashing, block game. yay!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published