Beispiel #1
0
        public static Point Create(int type, params int[] parameters)
        {
            Point point = null;

            switch (type)
            {
            case 0:
                point = new SnakePoint(parameters[0], parameters[1]);
                break;

            case 1:
                point = new Apple(parameters[0], parameters[1]);
                break;
            }
            return(point);
        }
Beispiel #2
0
 public static Point RenewApple(Apple apple)
 {
     apple.setCoords(apple);
     return(apple);
 }