Closed nightsky30 closed 4 years ago
Tested the following, and it did indeed cause delays. However, certain delays were not welcome especially when the human player was taking a turn...I've removed all calls to the function for the time being.
#include <QTimer>
void KoiKoi::waitABit()
{
QThread::sleep(1);
std::cout << "Waited..." << std::endl;
}
Fixed with commit c1795b0661913804b7ea3d53aba48358d413b410
Seems issue with not declaring koikoi and the display of the tally screen sometimes... If user pauses long enough in some case the game continues... After cpu has declared koi-koi or when cpu is oya??
Does not seem to be happening when player is oya...
Seems cpu turn continues after koikoi screen is displayed to user...not blocked there based on input: https://github.com/nightsky30/koikoi/blob/bd4bc80053b2a9d56657edf5ba28f43b03070991/src/koikoi.cpp#L1617 Meanwhile...The following might not have been called yet: https://github.com/nightsky30/koikoi/blob/bd4bc80053b2a9d56657edf5ba28f43b03070991/src/koikoi.cpp#L2263 And then the cpu might claim a yaku and declare game!
Fixed with commit fca91057e2866e03c9485a94e12312e8f21cfe5c
Implement sleeps during/after the cpu makes moves