예제 #1
0
        public void Move(Wasd direction)
        {
            Hide();
            foreach (var point in p)
            {
                point.Move(direction);
            }

            Draw();
        }
예제 #2
0
        internal void Move(Wasd direction)
        {
            Console.SetCursorPosition(x, y);
            Console.Write(' ');
            switch (direction)
            {
            case Wasd.DOWN:
                y += 1;
                break;

            case Wasd.LEFT:
                x -= 1;
                break;

            case Wasd.RIGHT:
                x += 1;
                break;
            }
        }