Explorar o código

Spawn a random seed wheen space key is hit

DricomDragon %!s(int64=4) %!d(string=hai) anos
pai
achega
fdd30f76ef
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      main.cpp

+ 5 - 0
main.cpp

@@ -153,6 +153,11 @@ int main()
 							clearWorld(world);
 							drawWorld(world, tileSet, map);
 							break;
+						case SDLK_SPACE:
+							seed.randomize();
+							putSeed(seed, world);
+							drawWorld(world, tileSet, map);
+							break;
 					}
 				case SDL_MOUSEMOTION:
 					cursorPos.x = event.motion.x / BLOC_SIZE;