For some reason,
Code:
exits this loop
Code:
And I don't know why it exits the loop, because at the end of it, I have this, which checks the two conditions needed to exit the Repeat
Code:
What happened?
Code:
:Lbl L
:∟WALL(J)-1→∟WALL(J
:G+1→G
:Z-1→Z
:If ‾1=Z
:Then
:DelVar ∟WATER
:1→dim(∟WATER
:If 270>J
:Then
:If ‾2=∟WALL(J+27
:1→∟WATER(1
:End
:If 54<J
:Then
:If ‾2=∟WALL(J-27
:1→∟WATER(1
:End
:If (J+1)/27≠int((J+1)/27
:Then
:If ‾2=∟WALL(J+1
:1→∟WATER(1
:End
:If (J-1)/27≠int((J-1)/27
:Then
:If ‾2=∟WALL(J-1
:1→∟WATER(1
:End
:If ∟WATER(1
:Then
:DelVar L
:J→∟WATER(1
:‾2→Z
:Repeat L=dim(∟WATER
:L+1→L
:∟WATER(L→R
:If 270>R
:Then
:If ‾1=∟WALL(R+27) and 0=max(∟WATER=R+27
:Then
:1+dim(∟WATER→dim(∟WATER
:R+27→∟WATER(dim(∟WATER
:End
:End
:If 54<R
:Then
:If ‾1=∟WALL(R-27) and 0=max(∟WATER=R-27
:Then
:1+dim(∟WATER→dim(∟WATER
:R-27→∟WATER(dim(∟WATER
:End
:End
:If (R+1)/27≠int((R+1)/27
:Then
:If ‾1=∟WALL(R+1) and 0=max(∟WATER=R+1
:Then
:1+dim(∟WATER→dim(∟WATER
:R+1→∟WATER(dim(∟WATER
:End
:End
:If (R-1)/27≠int((R-1)/27
:Then
:If ‾1=∟WALL(R-1) and 0=max(∟WATER=R-1
:Then
:1+dim(∟WATER→dim(∟WATER
:R-1→∟WATER(dim(∟WATER
:End
:End
:‾2→∟WALL(R
:int(R/27→T
:R-27T→U
:If R=∟PLACE(1
:Then
:det(12,GREEN,LTBLUE
:Else
:det(12,RED,LTBLUE
:End
:For(I,1,F
:If R=∟PLACE(I
:Then
:If 10≤∟LIVES(I
:Then
:Output(T,U,"θ
:Else
:Output(T,U,int(∟LIVES(I
:End
:‾2→∟LEVEL(I
:End
:End
:If 0=max(∟PLACE=R
:Output(T,U,"
:End
:End
:End
:Goto A
Code:
:Repeat ∟LIVES(1)≤0 or sum(0≥∟LIVES)=F-1
:For(E,1,F
:If 0≥∟LIVES(E
:Then
:Else
:Goto L
:Lbl A
:End
:End
:End
Code:
:If 0≥∟LIVES(1
:Disp "You Lose!
:If sum(0≥∟LIVES)=F-1 and 0<∟LIVES(1
:Disp "You Win!
:Pause