예제 #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;
 }
예제 #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;
 }
예제 #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;
        }