How to fix my non-starting little game app? : <p>I have to do a little game for my school, and I'm stuck in my program. When I launch the app it's working fine, but when I want to start a new game by the menubar, it says that the game is starting, but it isn't. I think the program is stuck in my FenRPS::newGame() function, but I don't know how to fix it.</p>

<pre><code>FenRPS::FenRPS() : wxFrame( NULL, wxID_ANY, "Rock–paper–scissors", 
wxDefaultPosition, wxSize(607,650), wxCAPTION|wxCLOSE_BOX|wxCLIP_CHILDREN )
{
  this-&gt;SetBackgroundColour( wxColor( 240,240,240 ));
  this-&gt;SetIcon( wxIcon( AppRPS::Icone_xpm ));

  //================ MENU ================
  wxMenuItem*  item;

  #define Item( menu, fctEvenement, texte, aide )                  \
      item = menu-&gt;Append( wxID_ANY, texte, aide );                \
      menu-&gt;Bind( wxEVT_MENU, fctEvenement, this, item-&gt;GetId() );
  #define Separateur( menu )    menu-&gt;AppendSeparator();

  menuGame = new wxMenu;
    Item( menuGame, newGame, "&amp;New Game", "Create a new game" );
    Separateur( menuGame );
    Item( menuGame, exit, "Exit", "Exit the game" );
  menuAbout = new wxMenu;
    Item( menuAbout, about, "&amp;About", "Display app informations" );

  menuBar = new wxMenuBar;
  menuBar-&gt;Append( menuGame, "&amp;Game" );
  menuBar-&gt;Append( menuAbout, "&amp;About" );
  this-&gt;SetMenuBar( menuBar );

  //=============== BOUTONS ==============
  rock_png = new wxStaticBitmap(this, wxID_ANY, wxBitmap("img/rock.png", 
wxBITMAP_TYPE_PNG), wxPoint(54,400), wxSize(128,128));
    buttonRock.Create( this, wxID_ANY, "R O C K", wxPoint(54,538), wxSize(128,50));
    buttonRock.Bind( wxEVT_BUTTON, playedRock, this );
  paper_png = new wxStaticBitmap(this, wxID_ANY, 
wxBitmap("img/paper.png", wxBITMAP_TYPE_PNG), wxPoint(236,400), wxSize(128,128));
    buttonPaper.Create( this, wxID_ANY, "P A P E R", wxPoint(236,538), wxSize(128,50));
    buttonPaper.Bind( wxEVT_BUTTON, playedPaper, this );
  scissors_png = new wxStaticBitmap(this, wxID_ANY, 
wxBitmap("img/scissors.png", wxBITMAP_TYPE_PNG), wxPoint(418,400), wxSize(128,128));
    buttonScissors.Create( this, wxID_ANY, "S C I S S O R S", wxPoint(418,538), wxSize(128,50));
    buttonScissors.Bind( wxEVT_BUTTON, playedScissors, this );

  stTextBox = new wxStaticText;
 stTextBox-&gt;Create( this, wxID_ANY, "\nWelcome in the Rock-Paper-Scissors game\n\n\n\nNo game is in progress", wxPoint(10,10), wxSize(580,364), wxALIGN_CENTRE_HORIZONTAL);
  stTextBox-&gt;SetBackgroundColour( *wxLIGHT_GREY );
  stTextBox-&gt;SetFont( wxFont( wxFontInfo(12).FaceName("Arial").Bold()));

  if( hasPlayed )
  {
    srand(time(0));
    choiceBot = (rand()%3)+1;
    message &lt;&lt; "Round n°" &lt;&lt; nbrRound &lt;&lt; "\n";
    stTextBox-&gt;SetLabel( message );

    if (choicePlayer == 1 &amp;&amp; choiceBot == 1) message &lt;&lt; message &lt;&lt; "Equality\n\n\n";
   else if (choicePlayer == 1 &amp;&amp; choiceBot == 2)
   {
        message &lt;&lt; message &lt;&lt; "Round lost, the bot has made 'paper'\n\n\n";
    scoreBot++;
}
else if (choicePlayer == 1 &amp;&amp; choiceBot == 3)
{
    message &lt;&lt; message &lt;&lt; "Round win, the bot had made 'scissors'\n\n\n";
    scorePlayer++;
}
else if (choicePlayer == 2 &amp;&amp; choiceBot == 1)
{
    message &lt;&lt; message &lt;&lt; "Round win, the bot had made 'rock'\n\n\n";
    scorePlayer++;
}
else if (choicePlayer == 2 &amp;&amp; choiceBot == 2) message &lt;&lt; message &lt;&lt; "Equality\n\n\n";
else if (choicePlayer == 2 &amp;&amp; choiceBot == 3)
{
    message &lt;&lt; message &lt;&lt; "Round lost, the bot has made 'scissors'\n\n\n";
    scoreBot++;
}
else if (choicePlayer == 3 &amp;&amp; choiceBot == 1)
{
    message &lt;&lt; message &lt;&lt; "Round lost, the bot has made 'rock'\n\n\n";
    scoreBot++;
}
else if (choicePlayer == 3 &amp;&amp; choiceBot == 2)
{
    message &lt;&lt; message &lt;&lt; "Round win, the bot had made 'paper'\n\n\n";
    scorePlayer++;
}
else if (choicePlayer == 3 &amp;&amp; choiceBot == 3) message &lt;&lt; message &lt;&lt; "Equality\n\n\n";
stTextBox-&gt;SetLabel( message );
nbrRound++;
hasPlayed = false;
}

  if( nbrRound &gt; 5 )
  {
    message &lt;&lt; "The game is over\n\n"
        &lt;&lt; "Score :\n"
        &lt;&lt; "&gt;&gt; Player     : " &lt;&lt; scorePlayer
        &lt;&lt; "\n&gt;&gt; Computer : " &lt;&lt; scoreBot;
if (scoreBot == scorePlayer)
    message &lt;&lt; message &lt;&lt; "Equality. Try again\n";
else if (scoreBot &gt; scorePlayer)
    message &lt;&lt; message &lt;&lt; "You lost, you'll be luckier next time\n";
else if (scorePlayer &gt; scoreBot)
    message &lt;&lt; message &lt;&lt; "You won, congratulations !\n";
stTextBox-&gt;SetLabel( message );
wxSleep(2);
  }
}

FenRPS::~FenRPS() {}

void FenRPS::playedRock( wxCommandEvent&amp; )     { choicePlayer = 1; hasPlayed = true; }
void FenRPS::playedPaper( wxCommandEvent&amp; )    { choicePlayer = 2; hasPlayed = true; }
void FenRPS::playedScissors( wxCommandEvent&amp; ) { choicePlayer = 3; hasPlayed = true; }
void FenRPS::newGame( wxCommandEvent&amp; )
{
  stTextBox-&gt;SetLabel( "\nThe game is starting..." );
}
</code></pre>
