// 3.Rotate public bool ConditionRotate(Player player, Block b) { if (player.Name == "Player_Server") { for (int i = 0; i < b.Row1; i++) { for (int j = 0; j < b.Column1; j++) { if (b.ConditionBoard(b.IBoard + i, b.JBoard + j) == false || board.MapPlayServer1[b.IBoard + i, b.JBoard + j] == 1 || b.JBoard + b.Row1 > 10 || b.IBoard + b.Row1 > 21) { return(false); } } } return(true); } else { for (int i = 0; i < b.Row1; i++) { for (int j = 0; j < b.Column1; j++) { if (b.ConditionBoard(b.IBoard + i, b.JBoard + j) == false || board.MapPlayClient1[b.IBoard + i, b.JBoard + j] == 1 || b.JBoard + b.Row1 > 10 || b.IBoard + b.Row1 > 21) { return(false); } } } return(true); } }
// 3.Rotate public bool ConditionRotate(Block b) { for (int i = 0; i < b.Row1; i++) { for (int j = 0; j < b.Column1; j++) { if (b.ConditionBoard(b.IBoard + i, b.JBoard + j) == false || board.MapPlayGame1[b.IBoard + i, b.JBoard + j] == 1 || b.JBoard + b.Row1 > 10 || b.IBoard + b.Row1 > 21) { return(false); } } } return(true); }