Exemple #1
0
 public ManageTours(ITourManager manager1, IRegionManager manager2, ITownsManager manager3, IHotelManager manager4)
 {
     _managertour   = manager1;
     _managerregion = manager2;
     _managertowns  = manager3;
     _managerhotel  = manager4;
 }
Exemple #2
0
 public PlayerActionFactory(ITownsManager townsManager, IPlayerManager playerManager, IReader reader,
                            IWriter writer)
 {
     this.townsManager  = townsManager;
     this.playerManager = playerManager;
     this.player        = playerManager.Player;
     this.reader        = reader;
     this.writer        = writer;
 }
 public TakeOnQuestMenu(string name, IReader reader, IWriter writer, ITownsManager townsManager,
                        IPlayerManager playerManager, IRandomNumberGenerator randomNumberGenerator, ICustomEventHandler handler)
     : base(name, reader, writer)
 {
     this.townsManager          = townsManager;
     this.playerManager         = playerManager;
     this.randomNumberGenerator = randomNumberGenerator;
     this.handler      = handler;
     this.questFactory = new QuestFactory(this.townsManager.GetCurrentTown(), this.randomNumberGenerator,
                                          handler);
 }
Exemple #4
0
        public SwitchTownMenu(string name, IReader reader, IWriter writer, ITownsManager townsManager,
                              IPlayerManager playerManager) : base(name, reader, writer)
        {
            this.townsManager  = townsManager;
            this.playerManager = playerManager;

            //generate the text of the menu
            this.menuText = new List <string>();
            foreach (var town in townsManager.GetTowns())
            {
                this.menuText.Add(town.Name);
            }
        }
Exemple #5
0
        //private static readonly Quest PoliceQuest = new Quest(1, "Police Quest",
        //    "Now you are in Police office.The police need you. Your mission, if you accept it, is to arrest three famous criminals. Go and find them. The mission will end up bringing three pairs of boots. You will receive boot, 50 experience and 500 money",
        //    50, 500);

        public PoliceOffice(ITownsManager townsManager, IPlayerManager playerManager,
                            IRandomNumberGenerator randomNumberGenerator, int id, string name, string description, int x, int y,
                            ICustomEventHandler handler, int sizeFactor = Constants.DefaultSizeFactor)
            : base(id, name, description, x, y, sizeFactor)
        {
            this.townsManager          = townsManager;
            this.playerManager         = playerManager;
            this.randomNumberGenerator = randomNumberGenerator;
            this.handler = handler;
            //this.QuestAvailableHere = PoliceQuest;
            //this.ItemRequeredToEnter = ItemToEnter;
            //this.QuestAvailableHere.RewardItem = new HeavyBoot(1, "PoliceBoots", 1, Rarity.Epic);
        }
Exemple #6
0
 public Engine(IPlayerManager playerManager, ITownsManager townsManager, IReader reader, IWriter writer,
               IPlayerActionFactory playerActionFactory, IRandomEncountersManager randomEncountersManager,
               IRandomNumberGenerator randomNumberGenerator)
 {
     this.playerManager           = playerManager;
     this.townsManager            = townsManager;
     this.reader                  = reader;
     this.writer                  = writer;
     this.playerActionFactory     = playerActionFactory;
     this.randomEncountersManager = randomEncountersManager;
     this.randomNumberGenerator   = randomNumberGenerator;
     //this.playerActionFactory = new PlayerActionFactory(this.townsManager, this.playerManager, reader, writer);
     //this.randomEncountersManager = new RandomEncountersManager(this.playerManager,this.reader,this.writer);
     //this.randomNumberGenerator = new RandomNumberGenerator();
 }
Exemple #7
0
 public PauseMenu(string name, IReader reader, IWriter writer, ITownsManager townsManager,
                  IPlayerManager playerManager) : base(name, reader, writer)
 {
     this.townsManager  = townsManager;
     this.playerManager = playerManager;
     this.Actions       = new Dictionary <int, Action>
     {
         { 0, () => ShouldBeRunning = false },
         {
             1, () =>
             {
                 var stm = new SwitchTownMenu("Switch town", this.Reader, this.Writer, this.townsManager,
                                              playerManager);
                 stm.StartMenu();
             }
         },
         {
             2, () =>
             {
                 var pid = new PlayerInfoDisplayer(this.Reader, this.Writer, this.playerManager.Player);
                 pid.Display();
             }
         },
         {
             3, () =>
             {
                 var bqm = new BrowseQuestsMenu("Quests menu", this.Reader, this.Writer, this.playerManager);
                 bqm.StartMenu();
             }
         },
         {
             4, () =>
             {
                 Console.Clear();
                 Environment.Exit(0);
             }
         }
     };
 }