Tetris Written in Go
jjinux.com
jjinux.com
g.piece = 1 + rand.Int()%numTypes
However, the official tetris guidelines say that the 7 types of pieces should all be selected in a random order, as if taken from a bag. After all 7 pieces are picked, you can put all of the pieces back in the bag and select again in a random order. [1]Of course, you don't HAVE to follow the official guidelines. I just thought it would be fun to compare.
However over the years, even after the guideline was instituted, there have been many different types of randomizers used. Of course, the original having none, and many a long the way having bugs.
I've used it for a couple of projects now but I can't really get on with it. It feels so easy and straightforward at first but I often keep hitting silly annoyances that slow down debugging time or even causes fatal exceptions of its own (eg resizing a window).
So I'd be interested to hear another developers experiences with termbox
* Inability to customise colours on systems that support it. * Weak support for wide characters as termbox works directly on "cells", but can work around it with application logic. * It's quite easy to cause fatals, especially when working directly on the underlying buffer. Need to be quite careful.
The fact that it's native and cross platform is fantastic though, I'm a little worried that early design decisions will make it hard to rectify some of the warts though without large backwards-incompatible changes.
"Quinn is an implementation of a popular falling-blocks game which, according to the Tetris Company, must not be named here."