Esempio n. 1
0
        /// <summary>
        /// Performs a run of the game engine
        /// </summary>
        /// <param name="input">The input parameter for the game, e.g. &quot;RMMLM&quot;</param>
        /// <returns>The string output of the game run, e.g. &quot;0 4 N&quot;</returns>
        public string Run(string input)
        {
            IEnumerable <Move> moves = inputInterpreter.Interpret(input);

            foreach (Move move in moves)
            {
                moveMethods[move].Invoke();
            }

            return(outputGenerator.GenerateOutput(piece));
        }
Esempio n. 2
0
        public List <string> Compare(string fileName)
        {
            var fileContent = _fileReader.ReadTextFile(fileName);

            var wordCount = _wordCounter.Count(fileContent);

            var primes = _primeNumberCalculator.CalculatePrimes(wordCount);

            var output = _outputGenerator.GenerateOutput(wordCount, primes);

            return(output);
        }
Esempio n. 3
0
 public string GetOutput()
 {
     return(outputGenerator.GenerateOutput(rovers));
 }