예제 #1
0
 //Info
 public void setInfo(Info info, int t)
 {
     info.Speed = t;
 }
예제 #2
0
 public int Check(Player player, Block block, Info info)//kiểm tra để có điểm
 {
     if (player.Name == "Player_Server")
     {
         int i = block.Row1 - 1;
         if (block.IBoard <= 3)
         {
             return(-1);
         }
         if (info.Speed < 100)
         {
             return(0);
         }
         int count, j, score;
         do
         {
             count = 0;
             for (j = 0; j < board.Column1; j++)
             {
                 if (board.MapPlayServer1[block.IBoard + i, j] == 1)
                 {
                     count++;
                 }
             }
             if (count == 10)
             {
                 score = 100;
                 info.UpLevel(info, score);
                 UpdateMap(player, block.IBoard + i);
                 Draw(player);
             }
             else
             {
                 i--;
             }
         } while (i >= 0);
         return(1);
     }
     else
     {
         int i = block.Row1 - 1;
         if (block.IBoard <= 3)
         {
             return(-1);
         }
         if (info.Speed <= 100)
         {
             return(0);
         }
         int count, j, score;
         do
         {
             count = 0;
             for (j = 0; j < board.Column1; j++)
             {
                 if (board.MapPlayClient1[block.IBoard + i, j] == 1)
                 {
                     count++;
                 }
             }
             if (count == 10)
             {
                 score = 100;
                 info.UpLevel(info, score);
                 UpdateMap(player, block.IBoard + i);
                 Draw(player);
             }
             else
             {
                 i--;
             }
         } while (i >= 0);
         return(1);
     }
 }
예제 #3
0
        private void btnInfo_Click(object sender, EventArgs e)
        {
            Info info = new Info();

            info.Show();
        }