private void CheckCras(Point point, Crah cras, Map map) { if (cras.cras.Contains(point)) { size++; cras.cras.Remove(point); cras.AddCras(historyPoint, map); } }
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(); } }
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(); } }
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(); } }