public void setStaffs(int[] staffs) { for (int i = 0; i < staffs.Length; i++) { if (staffs[i] != Staff.NONE) { fStaffs.addStaff(new Staff(this, staffs[i])); } } // fStaffs = staffs; }
public void addStaff(Staff staff) { if (fStaffs == null) { fStaffs = new StaffContainer(); } fStaffs.addStaff(staff); }
public void insertStaffs(Player owner, StaffContainer staffs) { // StaffContainer left = new StaffContainer(); while (true) { Staff best = staffs.getBestStaff(); if (best == null) { break; } staffs.removeStaff(best); best.setOwner(owner); Staff drop = this.addStaff(best); if (drop != null) { staffs.addStaff(drop); if (drop == best) { break; } } } }