
-----------------------------------
susan_101
Thu Jan 20, 2005 8:22 pm

timer
-----------------------------------
umm how would i create a timer that stops my program after like a minute or something liek that  :( heelp

-----------------------------------
Cervantes
Thu Jan 20, 2005 8:37 pm


-----------------------------------

loop
  exit when Time.Elapsed > (1000 * 60) %1000 milliseconds per second.  60 seconds per minute.
end loop


-----------------------------------
susan_101
Thu Jan 20, 2005 8:52 pm


-----------------------------------
hmm but this part of the program doesnt happen until later so wouldn't time.elpased not be accurate..i mean what if the user gets to this part around 30 seconds and the timer woul dbe 30 seconds ahead already :/

-----------------------------------
Andy
Thu Jan 20, 2005 8:53 pm


-----------------------------------
post some code so we have something to work with plz

-----------------------------------
susan_101
Thu Jan 20, 2005 8:57 pm


-----------------------------------





randint (random3, 1, 3) 
var answer : int 
var random : int 
var random2 : int 
var reply : string 



loop 
    
    locate (1, 1) 
    
    randint (random, 1, 12) 
    randint (random2, 1, 12) 

    put random, "*", random2 

    loop 
        locate (3, 1) 
        get answer 
        if answer not= random * random2 then 
            put "Wrong, deducting money" 
            locate (3, 1) 
            put "       " 
            locate (5, 1) 
            put "         " 
        else 
            locate (3, 1) 
            put "        " 
            locate (4, 1) 
            put "                " 
            put "Caught it" 
            exit 
        end if 
    end loop 

     
end loop 


-----------------------------------
susan_101
Thu Jan 20, 2005 8:58 pm


-----------------------------------
basically its a math game and theh user only has a certain amount of time to do it until time runs out

-----------------------------------
Andy
Thu Jan 20, 2005 8:59 pm


-----------------------------------
Oooo then u'd need a clock to do it... type clock, then press F9 in the turing editor.. if u still have trouble, post your new code and then we'll help you through it

-----------------------------------
susan_101
Thu Jan 20, 2005 9:00 pm


-----------------------------------
aite t ill try it out

-----------------------------------
susan_101
Thu Jan 20, 2005 9:02 pm


-----------------------------------
nvm i got it thznk
