Exemplo n.º 1
0
        /// <summary>
        /// Validate input and init Lawn
        /// </summary>
        /// <param name="input"></param>
        internal static void Init(string input)
        {
            int height;
            int width;

            var coords = input.AssertedSplitOnSpace(2);

            if (int.TryParse(coords[0], out height) && int.TryParse(coords[1], out width))
            {
                Lawn.Initialise(height, width);
            }
            else
            {
                throw new InvalidInputException(input);
            }
        }
Exemplo n.º 2
0
        public void OnBeforeEachTest()
        {
            Lawn.Initialise(5, 5);

            _position = new Position(0, 0);
        }
Exemplo n.º 3
0
 public void OnSetup()
 {
     Lawn.Initialise(10, 10);
 }