コード例 #1
0
 public bool ConditionRight(Player player, Block block)
 {
     if (player.Name == "Player_Server")
     {
         for (int i = 0; i < block.Row1; i++)
         {
             for (int j = 0; j < block.Column1; j++)
             {
                 if (block.Arr[i, j] == 1)
                 {
                     if (block.ConditionRight(block.IBoard + i, block.JBoard + j) == false || board.MapPlayServer1[block.IBoard + i, block.JBoard + j + 1] == 1 || block.IBoard <= 3)
                     {
                         return(false);
                     }
                 }
             }
         }
         return(true);
     }
     else
     {
         for (int i = 0; i < block.Row1; i++)
         {
             for (int j = 0; j < block.Column1; j++)
             {
                 if (block.Arr[i, j] == 1)
                 {
                     if (block.ConditionRight(block.IBoard + i, block.JBoard + j) == false || board.MapPlayClient1[block.IBoard + i, block.JBoard + j + 1] == 1 || block.IBoard <= 3)
                     {
                         return(false);
                     }
                 }
             }
         }
         return(true);
     }
 }
コード例 #2
0
ファイル: Play.cs プロジェクト: nhatduong97/TetrisNoConnect
 public bool ConditionRight(Block block)
 {
     for (int i = 0; i < block.Row1; i++)
     {
         for (int j = 0; j < block.Column1; j++)
         {
             if (block.Arr[i, j] == 1)
             {
                 if (block.ConditionRight(block.IBoard + i, block.JBoard + j) == false || board.MapPlayGame1[block.IBoard + i, block.JBoard + j + 1] == 1 || block.IBoard <= 3)
                 {
                     return(false);
                 }
             }
         }
     }
     return(true);
 }