Esempio n. 1
0
 private static Game GetGame()
 {
     IAgent agent = new SimpleAgent();
     var factories = new List<ICellFactory>();
     factories.Add(new EmptyCellFactory());
     factories.Add(new PitCellFactory());
     factories.Add(new BatCellFactory());
     var actions = new List<IAction>();
     actions.Add(new MoveAction());
     actions.Add(new FireAction());
     actions.Add(new TurnLeftAction());
     actions.Add(new TurnRightAction());
     actions.Add(new FindWumpusAction());
     actions.Add(new GrabAction());
     IMapGenerator generator = new RandomGenerator(factories);
     generator.AddMapGeneratedHook(new GoldAddHook());
     var game = new Game(generator, actions, agent);
     game.RegisterInitialisationHook(new GiveArrowHook());
     return game;
 }