4 ms·
Here's my tetris copy: http://wolandbros.com/tetris/ http://wolandbros.com/tetris/ Both the game and the source are much more minimal, it's very easy to custom
by gunn 7y ago
Here's my tetris copy: http://wolandbros.com/tetris/ http://wolandbros.com/tetris/
Both the game and the source are much more minimal, it's very easy to customise the rules. You can see the source here: https://github.com/gunn/tetris/blob/master/src/store.js https://github.com/gunn/tetris/blob/master/src/store.js
- djblue 7y agoSweet! Thanks for sharing. I see you're using pure-store to manage your game state. My implementation also uses a redux pattern for state management :)
- gunn 7y agoThank you too! It's fun seeing the different ways we implemented the same things, even pieces and rotation. pure-store is a library I made for very simple but efficient state management. The entire source is this file: https://github.com/gunn/pure-store/blob/master/src/index.ts https://github.com/gunn/pure-store/blob/master/src/index.ts
- yogthos 7y agoHere's a shorter cljs version [1], as a bonus it cross-compiles to the JVM and Js reusing the core logic. [1] https://github.com/yogthos/clj-tetris/blob/master/src/tetris/game.cljc https://github.com/yogthos/clj-tetris/blob/master/src/tetris...