public HubaBusSceneState SetUsedItems(HashSet <int> value) { var copy = new HubaBusSceneState(this); copy.UsedItems = value; return(copy); }
public HubaBusSceneState SetisOutOfTheHouse(bool value) { var copy = new HubaBusSceneState(this); copy.isOutOfTheHouse = value; return(copy); }
public HubaBusSceneState SetisPaid(bool value) { var copy = new HubaBusSceneState(this); copy.isPaid = value; return(copy); }
public HubaBusSceneState SetisBusWaiting(bool value) { var copy = new HubaBusSceneState(this); copy.isBusWaiting = value; return(copy); }
public HubaBusSceneState SetisInTheBus(bool value) { var copy = new HubaBusSceneState(this); copy.isInTheBus = value; return(copy); }
public HubaBusSceneState SethasBusLeft(bool value) { var copy = new HubaBusSceneState(this); copy.hasBusLeft = value; return(copy); }
public HubaBusSceneState SetCharPosition(Vector3S value) { var copy = new HubaBusSceneState(this); copy.CharPosition = value; return(copy); }
public HubaBusSceneState SetaskedForTicket(bool value) { var copy = new HubaBusSceneState(this); copy.askedForTicket = value; return(copy); }
public HubaBusSceneState SetAngerLevel(int value) { var copy = new HubaBusSceneState(this); copy.AngerLevel = value; return(copy); }
public GameState Set(HubaBusSceneState state) { var copy = new GameState(this); copy.HubaBus = state; return(copy); }
private GameState(GameState template) { AnnanaHouse = template.AnnanaHouse; HubaBus = template.HubaBus; AnnanaTeaParty = template.AnnanaTeaParty; HubaForest = template.HubaForest; }
// this constructor uses parameter just to differ from empty one public GameState(bool initial) { AnnanaHouse = new AnnanaSceneState(initial); AnnanaTeaParty = new AnnanaTeaPartySceneState(initial); HubaBus = new HubaBusSceneState(initial); HubaForest = new HubaForestSceneState(initial); }
// copy constructor private HubaBusSceneState(HubaBusSceneState template) { AngerLevel = template.AngerLevel; askedForTicket = template.askedForTicket; getOnTheBus = template.getOnTheBus; hasBusLeft = template.hasBusLeft; CharPosition = template.CharPosition; isBusWaiting = template.isBusWaiting; isDelivered = template.isDelivered; isDrunk = template.isDrunk; isInTheBus = template.isInTheBus; isOpened = template.isOpened; isOutOfTheHouse = template.isOutOfTheHouse; isPaid = template.isPaid; PickedUpItems = template.PickedUpItems; UsedItems = template.UsedItems; SetCharacterPosition(); }
// compare method public List <string> CompareChanges(HubaBusSceneState other) { var result = new List <string>(); if (!AngerLevel.Equals(other.AngerLevel)) { result.Add(String.Format("AngerLevel:\t{0}\t>>>\t{1}", other.AngerLevel, AngerLevel)); } if (!askedForTicket.Equals(other.askedForTicket)) { result.Add(String.Format("askedForTicket:\t{0}\t>>>\t{1}", other.askedForTicket, askedForTicket)); } if (!getOnTheBus.Equals(other.getOnTheBus)) { result.Add(String.Format("getOnTheBus:\t{0}\t>>>\t{1}", other.getOnTheBus, getOnTheBus)); } if (!hasBusLeft.Equals(other.hasBusLeft)) { result.Add(String.Format("hasBusLeft:\t{0}\t>>>\t{1}", other.hasBusLeft, hasBusLeft)); } if (!CharPosition.Equals(other.CharPosition)) { result.Add(String.Format("CharPosition:\t{0}\t>>>\t{1}", other.CharPosition, CharPosition)); } if (!isBusWaiting.Equals(other.isBusWaiting)) { result.Add(String.Format("isBusWaiting:\t{0}\t>>>\t{1}", other.isBusWaiting, isBusWaiting)); } if (!isDelivered.Equals(other.isDelivered)) { result.Add(String.Format("isDelivered:\t{0}\t>>>\t{1}", other.isDelivered, isDelivered)); } if (!isDrunk.Equals(other.isDrunk)) { result.Add(String.Format("isDrunk:\t{0}\t>>>\t{1}", other.isDrunk, isDrunk)); } if (!isInTheBus.Equals(other.isInTheBus)) { result.Add(String.Format("isInTheBus:\t{0}\t>>>\t{1}", other.isInTheBus, isInTheBus)); } if (!isOpened.Equals(other.isOpened)) { result.Add(String.Format("isOpened:\t{0}\t>>>\t{1}", other.isOpened, isOpened)); } if (!isOutOfTheHouse.Equals(other.isOutOfTheHouse)) { result.Add(String.Format("isOutOfTheHouse:\t{0}\t>>>\t{1}", other.isOutOfTheHouse, isOutOfTheHouse)); } if (!isPaid.Equals(other.isPaid)) { result.Add(String.Format("isPaid:\t{0}\t>>>\t{1}", other.isPaid, isPaid)); } if (!PickedUpItems.Equals(other.PickedUpItems)) { result.Add(String.Format("PickedUpItems:\t{0}\t>>>\t{1}", other.PickedUpItems, PickedUpItems)); } if (!UsedItems.Equals(other.UsedItems)) { result.Add(String.Format("UsedItems:\t{0}\t>>>\t{1}", other.UsedItems, UsedItems)); } return(result); }