private bool AttemptMoveCardinalDirection(CardinalDirection direction) { var deltaLoc = GridLocation.MakeFromCardinalDirection(direction); // should this be the focus manager or the selection manager // or some other manager all together? var active = selectionManager.GetActive(); // if there's nothing active, we might as well // guard return, because there's nothing left to be done. if (active == null) { Activate(creationManager.TileGrid.GetRandomNonNullGridItem()); return(true); } // now let's translate and see if we can find where we can move. var tileLocation = GridLocation.Add(active.GetGridPositionedComponent().GetLocation(), deltaLoc); while (creationManager.TileGrid.IsLocationValid(tileLocation)) { var possibleNextFocusTile = creationManager.TileGrid[tileLocation]; if (possibleNextFocusTile != null) { Activate(possibleNextFocusTile); return(true); } tileLocation = GridLocation.Add(tileLocation, deltaLoc); } return(false); }