Thanks to oysteikt for the colorization code; an extension of this would be very welcome. The game ended up on the torus because that is just what modulo results in and I couldn't be hassled to _not_ identify the edges with each other.