public VerticalLine(int x, int yTop, int yBottom, char sym) { pList = new List<Point>(); for(int y = yTop; y <= yBottom; y++) { Point p = new Point(x, y, sym); pList.Add(p); } }
public HorizontalLine(int xLeft, int xRight, int y, char sym) { pList = new List<Point>(); for (int x = xLeft; x <= xRight; x++) { Point p = new Point(x, y, sym); pList.Add(p); } }
private void StartGame() { lblEndGame.Visible = false; GamePlay.Instance.mySnake.Clear(); Snake.Point head = new Snake.Point { x = 10, y = 5 }; GamePlay.Instance.mySnake.Add(head); lblScore.Text = GamePlay.Instance.Score.ToString(); PlaceFood(); }