Explorar el Código

Spawn a random seed wheen space key is hit

DricomDragon hace 4 años
padre
commit
fdd30f76ef
Se han modificado 1 ficheros con 5 adiciones y 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;