Exemple #1
0
        public override string First()
        {
            string        filename = GetFilename();
            List <string> input    = System.IO.File.ReadAllLines(filename).ToList();

            PRINT = false;
            CrabCombat game = new CrabCombat(input);

            game.PlayGame();

            var result = game.Score();

            return(result.ToString());
        }
Exemple #2
0
        public override bool Test()
        {
            string        filename = GetTestFilename();
            List <string> input    = System.IO.File.ReadAllLines(filename).ToList();

            PRINT = false;
            CrabCombat game = new CrabCombat(input);

            game.PlayGame();
            var result = game.Score();

            bool testSucceeded = result == 306;

            return(testSucceeded);
        }