Fixed a bug in the ttt-gui.cpp

This commit is contained in:
Mathias Wagner 2023-10-11 10:22:06 +02:00
parent 73bb722879
commit 2d149c1256
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -112,9 +112,8 @@ int main() {
while (SDL_PollEvent(&event)) {
if (playerWon("X") || playerWon("O")) state = 1;
if (event.type == SDL_QUIT) gameOpen = false;
if (event.type == SDL_MOUSEBUTTONUP) {
if (event.type == SDL_MOUSEBUTTONUP && state == 0) {
int mouseX;
int mouseY;
SDL_GetMouseState(&mouseX, &mouseY);