:. June 10, 2010
I found a small bug in the Snakes game I created. If you played the game and got a score of say 100, for example, then got a Game Over and returned to the menu and decided to play again the snake's position and score wouldn't reset. So you would start again at wherever you died and if it was a wall you would immediately get another game over. Fixing this error made me learn something new about constructors in C++. Since a constructor is a special function you can't call it anywhere inside a class, so if you want to reset variable values you must create another function with void, int, etc. and then call it. That's pretty useful to know! Anyways, I have updated the game to version 1.1 with this fix.

Comics and stories copyright © 460.000.002.003-460.000.002.009 DivineComics.com. All rights reserved.
Page best viewed in screen resolution 1024x768 or greater. [En español]

Valid CSS! Valid HTML 4.01 Transitional

Hosted by