Exemple #1
0
 private void CheckCras(Point point, Crah cras, Map map)
 {
     if (cras.cras.Contains(point))
     {
         size++;
         cras.cras.Remove(point);
         cras.AddCras(historyPoint, map);
     }
 }
Exemple #2
0
 public void MoveDown(Crah crah, Map map)
 {
     if (Location.Y < map.y_max - 1)
     {
         Location.Y++;
         if (isMoveToBody(Location))
         {
             Location.Y--;
             return;
         }
         CheckCras(Location, crah, map);
         AutoList(Location);
     }
     else
     {
         Form1.GG();
     }
 }
Exemple #3
0
 public void MoveUp(Crah crah, Map map)
 {
     if (Location.Y > 0)
     {
         Location.Y--;
         if (isMoveToBody(Location))
         {
             Location.Y++;
             return;
         }
         CheckCras(Location, crah, map);
         AutoList(Location);
     }
     else
     {
         Form1.GG();
     }
 }
Exemple #4
0
 public void MoveRight(Crah crah, Map map)
 {
     if (Location.X < map.x_max - 1)
     {
         Location.X++;
         if (isMoveToBody(Location))
         {
             Location.X--;
             return;
         }
         CheckCras(Location, crah, map);
         AutoList(Location);
     }
     else
     {
         Form1.GG();
     }
 }