Exemplo n.º 1
0
        private void MoveRock(CellType currentType, Point current, Point destination, CellType[,] newState)
        {
            newState.Set(current, CellType.Empty);
            Rocks.Remove(current);
            IsChanged = true;
            if (currentType.IsHoRock() && !Cell.At(destination.Down()).IsEmpty())
            {
                newState.Set(destination, CellType.Lambda);
                Lambdas.Add(destination);
                HoRocks.Remove(current);
            }
            else
            {
                newState.Set(destination, currentType);
                Rocks.Add(destination);
            }

            if (Cell.At(destination.Down()).IsRobot())
            {
                State = MapState.Killed;
            }
        }
 public virtual IHateoasLinksBuilder <TResource, TEntity> AddLink(string reference, string routeName, Func <TResource, object> routeParametersDelegate)
 {
     Lambdas.Add(reference, (e) => new HateoasLink(UriBuilder.CreateUri(routeName, routeParametersDelegate.Invoke(e))));
     return(this);
 }