Christmas egg

This commit is contained in:
Rasmus Malver 2022-12-08 15:26:12 +01:00
parent 7e3db57406
commit 7e0dbe9efd

View file

@ -10,10 +10,10 @@ for y in range(1,np.shape(a)[0]-1):
# Visible? # Visible?
left = True if len(list(np.where(a[y][0:x]>=a[y][x])[0]))<1 else False left = True if len(list(np.where(a[y][0:x]>=a[y][x])[0]))<1 else False
right = True if len(list(np.where(a[y][x:] >=a[y][x])[0][1:]))<1 else False right = True if len(list(np.where(a[y][x:] >=a[y][x])[0][1:]))<1 else False
top = True if len(list(np.where(a[:,x][0:y]>=a[y,x])[0]))<1 else False aktiv = True if len(list(np.where(a[:,x][0:y]>=a[y,x])[0]))<1 else False
bottom = True if len(list(np.where(a[:,x][y:]>=a[y,x])[0][1:]))<1 else False passiv = True if len(list(np.where(a[:,x][y:]>=a[y,x])[0][1:]))<1 else False
if left or right or top or bottom: if left or right or aktiv or passiv:
visible+=1 visible+=1
print(visible) print(visible)