]> git.eshelyaron.com Git - emacs.git/commit
Allow different randomization of shapes in Tetris
authorTimothee Denizou <timothee.denizou@epita.fr>
Tue, 21 Jun 2022 19:50:15 +0000 (21:50 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2022 19:50:15 +0000 (21:50 +0200)
commitca6c8fc72c66c7ed997801e055e5fb25374d69b5
tree25ebfd465bcd1e1afa566c51e819a5f40ba2938f
parent3833ce16afe930a57554667afc16b20ce258983d
Allow different randomization of shapes in Tetris

* lisp/play/tetris.el (tetris-allow-repetitions): New user option.
(tetris--shuffle, tetris--seven-bag): New functions.
(tetris-new-shape): Use the option.

* Added 7 bag randomizer for tetris
A piece is selected from the bag and removed each time we want a piece
When the bag is empty, refill the bag with the seven piece and shuffle it

Copyright-paperwork-exempt: yes
lisp/play/tetris.el