예제 #1
0
 public void IncrementPenalties(int bits)
 {
     for (int m = 0, b = 256; m < 6; m++, b <<= 1)
     {
         if ((bits & b) != 0)
         {
             game.IncrementPenalty();
         }
         b <<= 1;
     }
 }
예제 #2
0
 public void AddScore(int score)
 {
     if (game.currentPlayer == 0)
     {
         score1 += score;
         if (score1 > 999999)
         {
             score1 = 0;
         }
         WriteNumber(score1, 0, 0, 6, 1);
         if (score1 >= nextbs1)
         {
             if (game.GetLives(1) < 5)
             {
                 game.AddLife(1);
                 game.drawing.DrawLives();
             }
             nextbs1 += bonusscore;
         }
     }
     else
     {
         score2 += score;
         if (score2 > 999999)
         {
             score2 = 0;
         }
         if (score2 < 100000)
         {
             WriteNumber(score2, 236, 0, 6, 1);
         }
         else
         {
             WriteNumber(score2, 248, 0, 6, 1);
         }
         if (score2 > nextbs2)
         {   /* Player 2 doesn't get the life until >20,000 ! */
             if (game.GetLives(2) < 5)
             {
                 game.AddLife(2);
                 game.drawing.DrawLives();
             }
             nextbs2 += bonusscore;
         }
     }
     game.IncrementPenalty();
     game.IncrementPenalty();
     game.IncrementPenalty();
 }