# Make a break before a do loop

### #1 Tictactoe

Tictactoe

Newbie

• Members
• 4 posts

• Calculators:
Casio fx-9860GII

Posted 15 November 2016 - 09:23 PM

I let a ball go around the display with:

A→1
B→7. /this is my start position
Lbl 1
/my problem is here
Do
Getkey
LpWhile Ans≠64 And Ans≠62 And Ans≠73 And Ans≠53

-------------------------------------
If Ans=64
Then B-1→B /moves down
IfEnd

If Ans=64
Then ClrText /deletes the last ball
IfEnd

If Ans=64
Then Locate A,B,"●"
IfEnd
---------------------------------------
This i made for all four directions
With
Then B+1→B
Then A-1→A
Then A+1→A
---------------------------------------
Goto 1

Now to my Problem:

When I press to go right/left/up/down
Then it goes more then one step because there is no break before the Do so it goes 3 to 4 times thru the hole algorithym.

I could make a break with displaying something before, but then i have two problems.
1.Upper Right corner is that think i displayed snd below Disp
2.I must press first Exe before press one of the keys (2 4 6 8) which iam using to move with.

### #2 Tictactoe

Tictactoe

Newbie

• Members
• 4 posts

• Calculators:
Casio fx-9860GII

Posted 15 November 2016 - 11:34 PM

I found a solution

For 1→[variable] to [number]
Next

The number is the speed regulator because as higher the number is as longer the calculator needs to pass the loop.

But its not the best solution who has better solutions?

Edited by Tictactoe, 15 November 2016 - 11:41 PM.

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users