Fixed a bug in the ttt-gui.cpp
This commit is contained in:
parent
73bb722879
commit
2d149c1256
@ -112,9 +112,8 @@ int main() {
|
|||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
if (playerWon("X") || playerWon("O")) state = 1;
|
if (playerWon("X") || playerWon("O")) state = 1;
|
||||||
|
|
||||||
|
|
||||||
if (event.type == SDL_QUIT) gameOpen = false;
|
if (event.type == SDL_QUIT) gameOpen = false;
|
||||||
if (event.type == SDL_MOUSEBUTTONUP) {
|
if (event.type == SDL_MOUSEBUTTONUP && state == 0) {
|
||||||
int mouseX;
|
int mouseX;
|
||||||
int mouseY;
|
int mouseY;
|
||||||
SDL_GetMouseState(&mouseX, &mouseY);
|
SDL_GetMouseState(&mouseX, &mouseY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user