Computer Science Canada RPS game!!!! (rock paper scissors lol) |
Author: | rownale [ 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 ![]() have fun lol |
Author: | Cervantes [ Fri Apr 28, 2006 3:10 pm ] |
Post subject: | |
I can crash your program; does that count as winning? ![]() 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. |
Author: | rownale [ 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 |
Author: | rownale [ Fri Apr 28, 2006 6:48 pm ] |
Post 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 ![]() 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)) |
Author: | [Gandalf] [ Fri Apr 28, 2006 6:55 pm ] |
Post 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. |
Author: | rownale [ Fri Apr 28, 2006 7:02 pm ] |
Post 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) |
Author: | upthescale [ Fri Apr 28, 2006 8:41 pm ] |
Post subject: | |
pretty poor....no matter what if i hit r, i will always lose...lose randint |
Author: | Cervantes [ Fri Apr 28, 2006 8:54 pm ] |
Post 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. |
Author: | TokenHerbz [ Sat Apr 29, 2006 12:28 pm ] | ||
Post subject: | |||
i crashed it too, i held down that "r" button too long. ![]() 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 ![]() Edited again: Just to say i cheated a bit to win, cause im lazy i made the "r" line this :
and then held the "r", but meh, i didn't want to sit for an hour to do it |
Author: | rownale [ Sat Apr 29, 2006 5:13 pm ] |
Post 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 |
Author: | MysticVegeta [ Sun Apr 30, 2006 10:42 am ] |
Post subject: | |
just hold one of the 3 keys for 2147483648 times... bu tthat would be too much waste of time wouldnt it? lol |
Author: | codemage [ Mon May 01, 2006 8:48 am ] |
Post subject: | |
CTRL-Z is an instant input crash as well (in 99% of Turing programs). |
Author: | MysticVegeta [ Mon May 01, 2006 1:48 pm ] |
Post subject: | |
He used getch though, so i dont think it willl crash on his, dont quote me on it though |
Author: | codemage [ Tue May 02, 2006 7:54 am ] |
Post subject: | |
No - you're right. Sad note: you can't even beat the computer with dynamite. ![]() |