Exemple #1
0
        static void Main(string[] args)
        {
            Dictionary<string, Dictionary<string, float>> WeaponConfigs = instantiateWeaponConfigs();
            Dictionary<string, Dictionary<string, float>> PlayersConfigs = instantiatePlayersConfigs();

            Player player = new Player("Michael", PlayersConfigs["Michael"]);
            Item harpe = new Item(false, "Harpe");
            MeleeWeapon sword = new MeleeWeapon("Sword", WeaponConfigs["Sword"]);
            MeleeWeapon axe = new MeleeWeapon("Axe", WeaponConfigs["Axe"]);
            RangeWeapon bow = new RangeWeapon("Bow", WeaponConfigs["Bow"]);

            player.addStuff(harpe);
            player.addStuff(sword);
            player.addStuff(axe);
            player.addStuff(bow);

            Dictionary<string, Player> opponents = new Dictionary<string, Player>();
            Player joseph = new Player("Joseph",PlayersConfigs["Joseph"]);
            Item harpe2 = new Item(false, "Harpe");
            joseph.addStuff(harpe2);
            opponents.Add("Joseph", joseph);
            Player connor = new Player("Connor", PlayersConfigs["Connor"]);
            MeleeWeapon sword2 = new MeleeWeapon("Sword", WeaponConfigs["Sword"]);
            connor.addStuff(sword2);
            opponents.Add("Connor", connor);
            Engine e = new Engine(player, opponents);
            e.start();
        }
Exemple #2
0
 public void addStuff(RangeWeapon r)
 {
     rangeWeapons.Add(r.name, r);
 }