Exemplo n.º 1
0
        public SensorResult sense(Blob blob, Board board)
        {
            SensorResult sensorResult;

            sensorResult.blobs = board.FindBlobsNear(blob.GetPosition(), sensingRadius);
            // remove self
            sensorResult.blobs.RemoveAll((b) => b == blob);
            sensorResult.food = board.FindFoodSiteNear(blob.GetPosition(), sensingRadius);
            return(sensorResult);
        }
Exemplo n.º 2
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;
 }