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())); }
public Player attackCheat(Player p, int s) { CheatComponent cheat = new AddAttack(playerToStats(p), new Stats(s)); return(setPlayerStats(p, cheat.getStats())); }