I don't want to defend the colour scheme. It was a colour scheme I put in initially to ensure that adjacent cubes have contrasting colours.
The engine only renders the quads that are "exposed to the air". When a cube is "carved out", it is marked as deleted and adjacent cubes are added to the render list (if they haven't been marked as already in the list) and the appropriate quad of these cubes is switched on. At render time, as the render list is traversed, cubes marked as deleted are routed around to drop them from the list.
There might be some fun getting the colours to do funky things in the cave, or having some surprising subterranean features uncovered as the cave is dug.
I wrote it using the Qt API, so it should readily port to linux. I will post teh codez shortly.