Beispiel #1
0
 public Blob(Blob existingBlob)
 {
     id            = Guid.NewGuid();
     state         = new SearchingState(this);
     this.props    = existingBlob.GetBlobProps();
     this.position = new RadialPosition(existingBlob.GetPosition());
     this.home     = new RadialPosition(existingBlob.GetHome());
     this.satiety  = Satiety.None;
 }
Beispiel #2
0
 public Blob(BlobProps props)
 {
     id            = Guid.NewGuid();
     state         = new SearchingState(this);
     this.props    = props;
     this.position = new RadialPosition();
     this.home     = new RadialPosition();
     this.satiety  = Satiety.None;
 }
Beispiel #3
0
        public void SetSatiety(Satiety satiety)
        {
            // TODO: Fix this
            Dictionary <Satiety, int> ordering = new Dictionary <Satiety, int>();

            ordering.Add(Satiety.None, 0);
            ordering.Add(Satiety.Half, 1);
            ordering.Add(Satiety.Full, 2);
            if (ordering[satiety] < ordering[this.satiety])
            {
                return;
            }
            this.satiety = satiety;
        }