Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mouse beep test
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
r.m_spy




PostPosted: Sat Apr 19, 2008 6:20 pm   Post subject: Mouse beep test

setscreen("graphics:max,max")
setscreen("title:Mouse.BEEP.Text")
var x,y,btn,l,di,exi,sc,s:int
l:=100
exi:=0
s:=0
sc:=1
di:=1
loop
delay(100)
cls
put" put your mouse at start"
Mouse.Where(x,y,btn)
drawfillbox(0,0,10,maxy,black)
drawfillbox(maxx,0,maxx-10,maxy,black)
exit when x<10
end loop
loop
delay(10)
cls
put" score:",sc,".",s," ",l," "..
if di=1 then
put"direction:right"
elsif di=2 then
put"direction:left"
end if
Mouse.Where(x,y,btn)
drawfillbox(0,0,10,maxy,black)
drawfillbox(maxx,0,maxx-10,maxy,black)
if l<0 then
if di=1 then
di:=2
if x>maxx-10 then
if sc=1 then
l:=l+100-s*5
elsif sc=2 then
l:=l+50-s*3
elsif sc=3 then
l:=l+30-s*2
elsif sc=4 then
l:=l+20-s*2
end if
s:=s+1
sound(200,10)
else
exi:=1
end if
elsif di=2 then
di:=1
if x<10 then
if sc=1 then
l:=l+100-s*5
elsif sc=2 then
l:=l+50-s*3
elsif sc=3 then
l:=l+30-s*2
elsif sc=4 then
l:=l+20-s*2
end if
s:=s+1
sound(200,10)
else
exi:=1
end if
end if
end if
l:=l-1
if s=10 then
sc:=sc+1
s:=0
if sc=2 then
l:=50
elsif sc=3 then
l:=20
elsif sc=4then
l:=10
end if
sound(300,10)
sound(250,10)
sound(200,30)
end if
exit when exi=1 or sc=5
end loop
cls
put"score:",sc,".",s
if sc=5 then
put"you won"
end if
Sponsor
Sponsor
Sponsor
sponsor
darkangel




PostPosted: Sun Apr 20, 2008 5:08 pm   Post subject: Re: Mouse beep test

Because the screen flashes it doesn't pick up that my mouse is touching the finish line.
use the View.Set ("offscreenonly") and the View.Update commands to fix that.
Tallguy




PostPosted: Tue Apr 22, 2008 8:38 am   Post subject: RE:Mouse beep test

i'm so confused
crysis




PostPosted: Tue Apr 22, 2008 8:34 pm   Post subject: RE:Mouse beep test

borring not fun pointless
syntax_error




PostPosted: Tue Apr 22, 2008 9:17 pm   Post subject: Re: RE:Mouse beep test

crysis @ Tue Apr 22, 2008 8:34 pm wrote:
borring not fun pointless


It's constructive criticism; not pointless unneeded comments.
Also, this is not the first case, you have done this please read the forum rules.
r.m_spy




PostPosted: Wed Apr 23, 2008 9:51 am   Post subject: Re: Mouse beep test

I'm sorry I'm so inconvinient but there are reasns for youre troubles. let me get the big one off my back first procedurs are needed to choose levels[/u]
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: