We have 7 tetris blocks, not 6

This commit is contained in:
zvon 2020-08-23 01:23:47 +02:00
parent f58bec6204
commit cf8ec294d1

View File

@ -584,7 +584,7 @@ int main() {
SDL_setFramerate(&gFPS, 60);
std::thread inputThread(doInput, main_scene);
inputThread.detach();
next_object = tetrisFunctions[std::rand()/((RAND_MAX + 1u)/6)](renderer, main_scene);
next_object = tetrisFunctions[std::rand()/((RAND_MAX + 1u)/7)](renderer, main_scene);
next_object.setPos(0.9, 0.5);
while( !quit ) {
SDL_framerateDelay(&gFPS);
@ -596,7 +596,7 @@ int main() {
std::lock_guard<std::mutex> guard(movement_mutex);
cur_object = next_object;
cur_object.setPos(0.5, 0.16);
next_object = tetrisFunctions[std::rand()/((RAND_MAX + 1u)/6)](renderer, main_scene);
next_object = tetrisFunctions[std::rand()/((RAND_MAX + 1u)/7)](renderer, main_scene);
next_object.setPos(0.9, 0.5);
}
}