예제 #1
0
        public Player allCheats(Player p, int s)
        {
            CheatComposite cheat = new CheatComposite(playerToStats(p));
            CheatComponent c1    = new AddLife(emptyStats(), new Stats(s));
            CheatComponent c2    = new AddAttack(emptyStats(), new Stats(s));
            CheatComponent c3    = new AddDefence(emptyStats(), new Stats(s));
            CheatComponent c4    = new AddMoney(emptyStats(), new Stats(s));

            cheat.AddCheat(c1);
            cheat.AddCheat(c2);
            cheat.AddCheat(c3);
            cheat.AddCheat(c4);

            return(setPlayerStats(p, cheat.getStats()));
        }
예제 #2
0
        public Player attackCheat(Player p, int s)
        {
            CheatComponent cheat = new AddAttack(playerToStats(p), new Stats(s));

            return(setPlayerStats(p, cheat.getStats()));
        }