Christmas egg

This commit is contained in:
Rasmus Malver 2022-12-08 15:26:12 +01:00
parent 7e3db57406
commit 7e0dbe9efd
1 changed files with 3 additions and 3 deletions

View File

@ -10,10 +10,10 @@ for y in range(1,np.shape(a)[0]-1):
# Visible?
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
top = 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
aktiv = True if len(list(np.where(a[:,x][0:y]>=a[y,x])[0]))<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
print(visible)