0

I am making a tic tac toe game, and I would like for the message box to pop up when the win condition has been met. But right now I have to click an additional time before the message box opens. how do I make the message box open without having to make the user click again?

basically

if X wins the tic tac toe game , I want the messagebox to pop up, but currently I have to click 1 more time . how do I make the program constantly check if somebody has won.

Kira
  • 1
  • 1
  • 1
    Could you add your source code? – csulli245 May 22 '21 at 18:56
  • How does the user click on the winning place now? – quamrana May 22 '21 at 18:57
  • there are 9 buttons in tic tac toe, when the win condition has been met I want a message box to pop up. but it only pops up after I've clicked an additional time, even if the "if statement" is met. is there a way to make me constantly check if the statement Is true? also how do I add source code – Kira May 22 '21 at 19:11
  • for adding the source code: first of it is simply just copy-pasting Your code in Your post ([edit] it in), second what You should really provide is a [mre] (read carefully), second, basically the best way to check "constantly" would be to check after each button press, so the function that is called by pressing a button also checks the condition. – Matiiss May 22 '21 at 19:26

0 Answers0