Showing posts with label window. Show all posts
Showing posts with label window. Show all posts

Tuesday

Fishy made a stupid.

Well, I was having trouble with creating the blocks which made up the level (I had just moved the 'generate level' code from the code for the game window to a Level class); the blocks were being created inside the game window '$window', but according to the error message, as far as the blocks were concerned '$window' didn't exist. This was odd, since all of the blocks had (as far as I could tell) been created after $window had been initialized.

Somehow I managed to get into my head that it would be a good idea to try replacing '$window' with 'Game.new', making each new block spawn in a new window. Unfortunately, every time a window is created, about 100 blocks are created. Yeah. Infinite loops FTL.

The computer froze, and I had no choice but to press the power button.

if fishy.fails == true
  fishy.facepalm
end