public Dictionary<Vector2, Tile> GetMovableNeighbors(Tile center, int controllingPlayerId, Tile dest = null)
{
var ret = GetNeighbors(center.position);
//filter tiles that are too high/low to move to & are passable
ret = ret.Where(t => !t.Value.unpassable && isHeightPassable(t.Value, center)).ToDictionary(k => k.Key, v => v.Value);
//filter out tiles with enemies on them that aren't the destination
ret = ret.Where(t =>
(dest != null && t.Key == dest.position) ||
!pieces.Pieces.Any(m => m.tilePosition == t.Key && m.playerId != controllingPlayerId)
).ToDictionary(k => k.Key, v => v.Value);
bool destinationOccupied = dest != null && pieces.Pieces.Any(p => p.tilePosition == dest.position);
//make sure not to consider tiles that would be where the moving pieces lands when it attacks
ret = ret.Where(t =>
dest == null
|| dest.position == t.Key
|| !destinationOccupied
|| TileDistance(t.Key, dest.position) > 1
|| !pieces.Pieces.Any(p => p.tilePosition == t.Key)
).ToDictionary(k => k.Key, v => v.Value);
return ret;
}