static void Main(string[] args) { int x = 0; int y = 0; Edirection direction = (Edirection)int.Parse(Console.ReadLine()); Move(direction, ref x, ref y); Console.WriteLine("x : {0}, y: {1}", x, y); string[] directions = new string[(int)Edirection.Max]; Console.WriteLine(directions.Length); }
static void Move(Edirection direction, ref int x, ref int y) { switch (direction) { case Edirection.North: x += 1; break; case Edirection.South: y += 1; break; case Edirection.East: x -= 1; break; case Edirection.West: y -= 1; break; } }