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

Username:   Password: 
 RegisterRegister   
 TIC TAC TOE
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
notleetprogrammer




PostPosted: Fri Jun 09, 2006 5:30 pm   Post subject: TIC TAC TOE

HEY...i came to this site with possebly the worst looking Tic Tac Toe game ever...but now it is finished and way better than my fist one ever was...


TicTacToe.zip
 Description:

Download
 Filename:  TicTacToe.zip
 Filesize:  27.5 KB
 Downloaded:  313 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
notleetprogrammer




PostPosted: Fri Jun 09, 2006 5:33 pm   Post subject: (No subject)

This was how this game started
code:


left click is x
right click is y


var x, y, button : int
var buttonnumber, buttonupdown : int
var font1 : int
var check : boolean := false
drawbox (300, 300, 100, 100, black)
drawline (235, 300, 235, 100, black)
drawline (160, 300, 160, 100, black)
drawline (300, 235, 100, 235, black)
drawline (300, 170, 100, 170, black)
font1 := Font.New ("serif:40:bold")
mousewhere (x, y, button)
buttonchoose ("multibutton")

loop
check := false
loop
buttonwait ("down", x, y, buttonnumber, buttonupdown)
if buttonnumber = 1 and buttonupdown = 1 then
drawfilloval (x, y, 20, 20, black)
check := true
end if
exit when check = true
end loop
check := false
loop
buttonwait ("down", x, y, buttonnumber, buttonupdown)
if buttonnumber = 3 and buttonupdown = 1 then
Font.Draw ("X", x, y, font1, red)
check := true
end if
exit when check = true
end loop
end loop
code:
upthescale




PostPosted: Fri Jun 09, 2006 9:18 pm   Post subject: (No subject)

nice man, awsome game, cept when i hit no to paly again, it still played lol but good job
notleetprogrammer




PostPosted: Fri Jun 09, 2006 9:30 pm   Post subject: (No subject)

thnx man...took me a while to make it..cause i just started this turing thing...lol this was for my final proj. umm to not play again it's supposed to be "No" not "no"
upthescale




PostPosted: Fri Jun 09, 2006 10:24 pm   Post subject: (No subject)

wut u can do is go
if answer = "No " or answer "no" then
code
end if


or u can use an upper string btu i dont no howe to use it
TheOneTrueGod




PostPosted: Sat Jun 10, 2006 9:22 am   Post subject: (No subject)

neurgh, no upthescale, thats not what you should do. You shoule use

code:

Str.Upper(s : string)


where s is the string you want to check. This way, it covers entries like "nO" or "NO" as well.
notleetprogrammer




PostPosted: Sat Jun 10, 2006 9:41 am   Post subject: (No subject)

thnx for ur help...but i dunno how to use the
code:
Str.Upper(s : string)
TheOneTrueGod




PostPosted: Sat Jun 10, 2006 9:44 am   Post subject: (No subject)

code:

put Str.Upper("hi, tHis cOuLd be an ExAmple Of WHAT STRUPPER does")


Try out some other examples, like using it with a variable. Its not too hard to figure out Wink
Sponsor
Sponsor
Sponsor
sponsor
notleetprogrammer




PostPosted: Sat Jun 10, 2006 10:16 am   Post subject: (No subject)

lol thnx..i'll try it
notleetprogrammer




PostPosted: Mon Jun 12, 2006 7:54 pm   Post subject: (No subject)

comon ppl i need feeeedaback
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  [ 10 Posts ]
Jump to:   


Style:  
Search: