示例#1
0
文件: Game.cs 项目: AurelVU/Atta3
        public void ChangePlate(GamePoint point)
        {
            GamePoint point1 = new GamePoint(point.X, point.Y);

            if (ProverkaLine(point))
            {
                Cell.ColorCell color = Place[point1.X, point1.Y].GetColor;
                GamePoint      res   = FindPoint(point);
                Score += (int)Math.Pow(Change(res, Place[point.X, point.Y].GetColor), 2);
                Random random = new Random();
                Place[point1.X, point1.Y].ChangeColotInt(random.Next(5));
            }
        }
示例#2
0
文件: Game.cs 项目: AurelVU/Atta3
 int Change(GamePoint point, Cell.ColorCell color)
 {
     if (point.X < 0 || point.X > 15 || point.Y < 0 || point.Y > 15)
     {
         return(0);
     }
     if (Place[point.X, point.Y].GetColor != color)
     {
         return(0);
     }
     Cell.ColorCell color1 = Place[point.X, point.Y].GetColor;
     Place[point.X, point.Y].GetColor = Cell.ColorCell.White;
     return(1 + Change(new GamePoint(point.X + 1, point.Y), color1) + Change(new GamePoint(point.X - 1, point.Y), color1) + Change(new GamePoint(point.X, point.Y + 1), color1) + Change(new GamePoint(point.X, point.Y - 1), color1));
 }
示例#3
0
 public static Color ConvertColorCellToColor(Cell.ColorCell color)
 {
     if (color == Cell.ColorCell.Blue)
     {
         return(Color.Blue);
     }
     if (color == Cell.ColorCell.Green)
     {
         return(Color.Green);
     }
     if (color == Cell.ColorCell.Orange)
     {
         return(Color.Orange);
     }
     if (color == Cell.ColorCell.Pink)
     {
         return(Color.Pink);
     }
     if (color == Cell.ColorCell.Red)
     {
         return(Color.Red);
     }
     return(Color.White);
 }