Exemplo n.º 1
0
        private Unit createUnit(Race race, String s)
        {
            Unit u = new UnitImpl();

            u.name   = s;
            u.mov    = 2;
            u.aBouge = false;
            u.race   = race;
            switch (race.name)
            {
            case "human":
                u.hp  = 15;
                u.atk = 6;
                u.def = 3;
                u.dis = 1;
                break;

            case "elf":
                u.hp  = 12;
                u.atk = 4;
                u.def = 3;
                u.dis = 2;
                break;

            case "orc":
                u.hp  = 17;
                u.atk = 5;
                u.def = 2;
                u.dis = 1;
                break;

            default:
                u.hp  = 15;
                u.atk = 6;
                u.def = 3;
                u.dis = 1;
                break;
            }
            return(u);
        }
Exemplo n.º 2
0
 private Unit createUnit(Race race, String s)
 {
     Unit u = new UnitImpl();
     u.name = s;
     u.mov = 2;
     u.aBouge = false;
     u.race = race;
     switch (race.name)
     {
         case "human":
             u.hp = 15;
             u.atk = 6;
             u.def = 3;
             u.dis = 1;
             break;
         case "elf":
             u.hp = 12;
             u.atk = 4;
             u.def = 3;
             u.dis = 2;
             break;
         case "orc":
             u.hp = 17;
             u.atk = 5;
             u.def = 2;
             u.dis = 1;
             break;
         default:
             u.hp = 15;
             u.atk = 6;
             u.def = 3;
             u.dis = 1;
             break;
     }
     return u;
 }