Пример #1
0
        private Move GetMove()
        {
            // Should read a input string. e.g. e1
            string coord = Console.In.ReadLine();
            var    to    = Position.MakePositionFromCoord(coord);

            return(new Move(_larva.Pos, to));
        }
Пример #2
0
        private Move GetMove()
        {
            try
            {
                string   input  = Console.In.ReadLine();
                string[] coords = input.Split(SEPERATORS);

                var from = Position.MakePositionFromCoord(coords[0]);
                var to   = Position.MakePositionFromCoord(coords[1]);

                return(new Move(from, to));
            }
            catch (Exception) { throw new InvalidMoveException(); }
        }