Example #1
0
		public SimpleGameState(IGameParser parser, IRoundtimeHandler roundtimeHandler)
		{
			_parser = parser;
			_roundtimeHandler = roundtimeHandler;
			_components.Set(ComponentKeys.Prompt, ">");

			TextTracker = new DataTracker<string>();
			TagTracker = new DataTracker<IEnumerable<Tag>>();
		}
Example #2
0
        static void Main(string[] parameters)
        {
            try
            {
                IGameParser parser = GetGameParser();
                Game        game   = parser.BuildGame(parameters);

                DisplayFinalScore(game.GetScore());
                foreach (var frame in game.GetFrames())
                {
                    DisplayFrameContent(frame);
                }
            }
            catch (BowlingException e)
            {
                DisplayException(e);
            }
            catch (Exception e)
            {
                LogToEvenViewer(e);
            }
        }
Example #3
0
 public InputParser(IGameParser gameParser)
 {
     _gameParser = gameParser;
 }
 public DataImporterClass(IContextFactory contextFactory, IGameParser gameParser)
 {
     _contextFactory = contextFactory;
     _gameParser = gameParser;
 }