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

Username:   Password: 
 RegisterRegister   
 RPS game!!!! (rock paper scissors lol)
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rownale




PostPosted: Fri Apr 28, 2006 3:03 pm   Post subject: RPS game!!!! (rock paper scissors lol)

heres my rock paper scissors game
i will release the code later
the AI is super friggin intelligent
if you beat it plz tell me
you probably won't win (im 99.999999% sure)
but if u do win tell me

a score counter is included
and u dont need to hit enter after typing in 'r' or 'p' or 's'

here it is Razz
have fun lol



rock paper scissors.t
 Description:
RPS

Download
 Filename:  rock paper scissors.t
 Filesize:  804 Bytes
 Downloaded:  492 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Fri Apr 28, 2006 3:10 pm   Post subject: (No subject)

I can crash your program; does that count as winning? Twisted Evil

But yeah, I'm going to take this as a joke program. Haha!

Moved to [Turing Source Code] since, despite "i will release the code later", the code has been released.
rownale




PostPosted: Fri Apr 28, 2006 3:21 pm   Post subject: crash

yeah this is a bit of a joke program

im gonna award u a WIN because i can't even figure out how to crash my own game lol
rownale




PostPosted: Fri Apr 28, 2006 6:48 pm   Post subject: (No subject)

k heres the code
really excellent AI programming by me lol
Quote:

var font, highscore : int
highscore := 0
font := Font.New ("Palatino:24:Bold") %sets font
var f : string (1)
Font.Draw ("The rock paper scissors game!!!", 70, 375, font, red) %nice lettering
locate (4, 17)
put "To play just type (r)ock, (s)cissors, (p)aper!"
loop
locate (5, 1)
getch (f)
locate (6, 1)
if f = "r" then
put "You chose rock ; the computer chose paper"
put "You lose!"
put "" %I know; i could make this a procedure or something and shorten it but i rather not
put ""
highscore := highscore + 1 %Unbeatable AI Razz
elsif f = "s" then
put "You chose scissors ; the computer chose rock"
put "You lose!"
put ""
put ""
highscore := highscore + 1
elsif f = "p" then
put "You chose paper ; the computer chose scissors"
put "You lose!"
put ""
put ""
highscore := highscore + 1
elsif f = "d" then
put "You chose dynamite ; the computer chose toilet" %just added this lol
put "You light the switch, but it is too late..."
put "The fuse burns out in the tiolets murky waters"
put "You lose!"
highscore :=highscore +1
else
put "please enter a valid command" %in case user enters something other than r p or s
put "" %to make it not say "you lose" (clears that part of the screen)
put ""
end if
locate (10, 1)
put "SCORE : 0/", highscore %the highscore; always set to 0 out of highscore
end loop



Go ahead...Try to beat it lol ((without changing teh code))
[Gandalf]




PostPosted: Fri Apr 28, 2006 6:55 pm   Post subject: (No subject)

Umm... Cervantes already beat it and you already posted the code when you attached the .t file.

Also, when posting code, either use syntax or code tags, not quote.
rownale




PostPosted: Fri Apr 28, 2006 7:02 pm   Post subject: (No subject)

Darn it!
I made an exe file but i had some trouble uploading it so i guess i uploaded the t file by accident.
i wont believe that cervantes beat it till he tells me how.

Also the source code that i posted is also updated with a dynamite feature
(you lose anyways though)
upthescale




PostPosted: Fri Apr 28, 2006 8:41 pm   Post subject: (No subject)

pretty poor....no matter what if i hit r, i will always lose...lose randint
Cervantes




PostPosted: Fri Apr 28, 2006 8:54 pm   Post subject: (No subject)

rownale wrote:
i wont believe that cervantes beat it till he tells me how.

This is a secret that must be guarded with the utmost care. Sorry.

Besides, I never said I beat it.

I mean... I stared viciously at the program until it beat itself for me.
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: Sat Apr 29, 2006 12:28 pm   Post subject: (No subject)

i crashed it too, i held down that "r" button too long. Smile so i win

upthescale, there is no randint in this game, though there should be...

Maker: Make it actually playable...

make the comp randomize 1 - 3, 1 = rock, 2 = s, 3 = p,
then with this, you see if it beats the player useing if statments...
then it wont be so stupid, and as for the AI, i dont thing that counts as one.

Edit: Additions, add'd names, took out swears, and made it better Smile

Edited again: Just to say i cheated a bit to win, cause im lazy

i made the "r" line this :
code:

highscore := highscore + 100000000

and then held the "r", but meh, i didn't want to sit for an hour to do it
rownale




PostPosted: Sat Apr 29, 2006 5:13 pm   Post subject: (No subject)

o so thats how u beat it

i do know how to make rand.ints im using them in my rpg game i just wanted a game that u cant beat lol
MysticVegeta




PostPosted: Sun Apr 30, 2006 10:42 am   Post subject: (No subject)

just hold one of the 3 keys for 2147483648 times... bu tthat would be too much waste of time wouldnt it? lol
codemage




PostPosted: Mon May 01, 2006 8:48 am   Post subject: (No subject)

CTRL-Z is an instant input crash as well (in 99% of Turing programs).
MysticVegeta




PostPosted: Mon May 01, 2006 1:48 pm   Post subject: (No subject)

He used getch though, so i dont think it willl crash on his, dont quote me on it though
codemage




PostPosted: Tue May 02, 2006 7:54 am   Post subject: (No subject)

No - you're right.

Sad note: you can't even beat the computer with dynamite. Embarassed
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  [ 14 Posts ]
Jump to:   


Style:  
Search: