Example #1
0
 private void ניצחוןToolStripMenuItem_Click(object sender, EventArgs e)
 {
     b.Update_count();
     if (b.CountIsLigalMove(1) == 0 && b.CountIsLigalMove(-1) == 0)
     {
         MessageBox.Show("the game was ended");
         if (b.getblacks() > b.getwhites())
         {
             MessageBox.Show("השחור ניצח");
         }
         if (b.getblacks() < b.getwhites())
         {
             MessageBox.Show("הלבן ניצח");
         }
         if (b.getblacks() == b.getwhites())
         {
             MessageBox.Show("תיקו");
         }
         SystemSounds.Asterisk.Play();
     }
     else
     {
         MessageBox.Show("לאחד השחקנים יש עוד מהלך חוקי ");
     }
 }
Example #2
0
 public void illigal_player_turn()
 {
     if (b.CountIsLigalMove(turn) == 0)
     {
         //במקרה שאני תקוע מעביר טור למחשב
         Console.WriteLine("מעביר תור למחשב כי אני תקוע");
         computermove();
         b.DrawBoard(g);
         label5.Text = b.getblacks().ToString();
         label6.Text = b.getwhites().ToString();
     }
 }