I was thinking of something like Tetris, of course, as an inspiration; though the nature of the problem makes it a bit more frustrating when the 'next' base keeps coming wrong. A more sophisticated version of the game could bias the randomness a bit so that you don't get stuck in completely unwinnable loops I guess.