Beispiel #1
0
        public bool TryAdjustMinMax(TilePlacement placement)
        {
            if (placement.X != x)
            {
                return(false);
            }

            if (placement.Y < minY)
            {
                minY = placement.Y;
            }
            if (placement.Y > maxY)
            {
                maxY = placement.Y;
            }
            return(true);
        }
        public bool TryAdjustMinMax(TilePlacement placement)
        {
            if (placement.Y != y)
            {
                return(false);
            }

            if (placement.X < minX)
            {
                minX = placement.X;
            }
            if (placement.X > maxX)
            {
                maxX = placement.X;
            }
            return(true);
        }
Beispiel #3
0
 public IMoveDirectionStrategy GetOppositeStrategy(TilePlacement placement)
 {
     return(new MoveDirectionStrategyHorizontal(placement.X, placement.X, placement.Y));
 }
Beispiel #4
0
 public void AddPlacement(TilePlacement placement)
 {
     placements.Add(placement);
     SetDirectionStrategy();
 }