Beispiel #1
0
    public HubaBusSceneState SetUsedItems(HashSet <int> value)
    {
        var copy = new HubaBusSceneState(this);

        copy.UsedItems = value;
        return(copy);
    }
Beispiel #2
0
    public HubaBusSceneState SetisOutOfTheHouse(bool value)
    {
        var copy = new HubaBusSceneState(this);

        copy.isOutOfTheHouse = value;
        return(copy);
    }
Beispiel #3
0
    public HubaBusSceneState SetisPaid(bool value)
    {
        var copy = new HubaBusSceneState(this);

        copy.isPaid = value;
        return(copy);
    }
Beispiel #4
0
    public HubaBusSceneState SetisBusWaiting(bool value)
    {
        var copy = new HubaBusSceneState(this);

        copy.isBusWaiting = value;
        return(copy);
    }
Beispiel #5
0
    public HubaBusSceneState SetisInTheBus(bool value)
    {
        var copy = new HubaBusSceneState(this);

        copy.isInTheBus = value;
        return(copy);
    }
Beispiel #6
0
    public HubaBusSceneState SethasBusLeft(bool value)
    {
        var copy = new HubaBusSceneState(this);

        copy.hasBusLeft = value;
        return(copy);
    }
Beispiel #7
0
    public HubaBusSceneState SetCharPosition(Vector3S value)
    {
        var copy = new HubaBusSceneState(this);

        copy.CharPosition = value;
        return(copy);
    }
Beispiel #8
0
    public HubaBusSceneState SetaskedForTicket(bool value)
    {
        var copy = new HubaBusSceneState(this);

        copy.askedForTicket = value;
        return(copy);
    }
Beispiel #9
0
    public HubaBusSceneState SetAngerLevel(int value)
    {
        var copy = new HubaBusSceneState(this);

        copy.AngerLevel = value;
        return(copy);
    }
Beispiel #10
0
    public GameState Set(HubaBusSceneState state)
    {
        var copy = new GameState(this);

        copy.HubaBus = state;
        return(copy);
    }
Beispiel #11
0
 private GameState(GameState template)
 {
     AnnanaHouse    = template.AnnanaHouse;
     HubaBus        = template.HubaBus;
     AnnanaTeaParty = template.AnnanaTeaParty;
     HubaForest     = template.HubaForest;
 }
Beispiel #12
0
 // 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);
 }
Beispiel #13
0
 // 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();
 }
Beispiel #14
0
    // 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);
    }