Browse Source

Spawn a random seed wheen space key is hit

DricomDragon 4 năm trước cách đây
mục cha
commit
fdd30f76ef
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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;