func (b Board) canLeaveUsedTiles(movedTileIDs map[tile.ID]struct{}, movedTilePositions map[tile.X]map[tile.Y]struct{}) bool {
	for t2ID, tp2 := range b.UsedTiles {
		if _, ok := movedTileIDs[t2ID]; !ok {
			if movedTilePositionsY, ok := movedTilePositions[tp2.X]; ok {
				if _, ok := movedTilePositionsY[tp2.Y]; ok {
					return false
				}
			}
		}
	}
	return true
}
// canLeaveUsedTiles determines if all of the used tiles on the board that are not in movedTilesIDs
// will not be replaced by any of the tiles being moved.
canLeaveUsedTiles determines if all of the used tiles on the board that are not in movedTilesIDs
will not be replaced by any of the tiles being moved.
// canLeaveUsedTiles determines if all of the used tiles on the board that are not in movedTilesIDs // will not be replaced by any of the tiles being moved .
func (b Board) canLeaveUsedTiles(movedTileIDs map[tile.ID]struct{}, movedTilePositions map[tile.X]map[tile.Y]struct{}) bool {
	for t2ID, tp2 := range b.UsedTiles {
		if _, ok := movedTileIDs[t2ID]; !ok {
			if movedTilePositionsY, ok := movedTilePositions[tp2.X]; ok {
				if _, ok := movedTilePositionsY[tp2.Y]; ok {
					return false
				}
			}
		}
	}
	return true
}
func ( b Board ) canLeaveUsedTiles ( movedTileIDs map [ tile . ID ] struct { } , movedTilePositions map [ tile . X ] map [ tile . Y ] struct { } ) bool { for t2ID , tp2 := range b . UsedTiles { if _ , ok := movedTileIDs [ t2ID ] ; ! ok { if movedTilePositionsY , ok := movedTilePositions [ tp2 . X ] ; ok { if _ , ok := movedTilePositionsY [ tp2 . Y ] ; ok { return false } } } } return true }
canLeaveUsedTiles determines if all of the used tiles on the board that are not in movedTilesIDs
will not be replaced by any of the tiles being moved.
canLeaveUsedTiles determines if all of the used tiles on the board that are not in movedTilesIDs will not be replaced by any of the tiles being moved .