We have 7 tetris blocks, not 6
This commit is contained in:
parent
f58bec6204
commit
cf8ec294d1
@ -584,7 +584,7 @@ int main() {
|
|||||||
SDL_setFramerate(&gFPS, 60);
|
SDL_setFramerate(&gFPS, 60);
|
||||||
std::thread inputThread(doInput, main_scene);
|
std::thread inputThread(doInput, main_scene);
|
||||||
inputThread.detach();
|
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);
|
next_object.setPos(0.9, 0.5);
|
||||||
while( !quit ) {
|
while( !quit ) {
|
||||||
SDL_framerateDelay(&gFPS);
|
SDL_framerateDelay(&gFPS);
|
||||||
@ -596,7 +596,7 @@ int main() {
|
|||||||
std::lock_guard<std::mutex> guard(movement_mutex);
|
std::lock_guard<std::mutex> guard(movement_mutex);
|
||||||
cur_object = next_object;
|
cur_object = next_object;
|
||||||
cur_object.setPos(0.5, 0.16);
|
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);
|
next_object.setPos(0.9, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user