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

Username:   Password: 
 RegisterRegister   
 Help Guys
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mac




PostPosted: Tue Jan 07, 2003 12:22 pm   Post subject: Help Guys

help i want to make a hang-man game but i don't know how can u get help me out
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue Jan 07, 2003 5:54 pm   Post subject: (No subject)

we are not going to make your game for you but we can give you some tips with the parts of your game.

1st of all you are going to need a litst of worads to use in the game, you coude ether save thes in a file or have them all as vars in the game (if they are saved in file it whode give the user the posiblitey to add more worads latter on)

2nd you whode be to anyize the wronds and see how long they are, also load the file with them in it if you save them in a file. next you whode have to make a "_" for erver letter in everworad.

3rd you whode need to get imput from the user and compar it agested all the letters in the worad. if one is rigth then show that letter and if one is wrong draw a new pice of the guy.

4th either all the pices are drawn or the worad has been spelled out. then you need to reset everything and repeate setpes 1-4.

that is the baicks of how you whode do it, i sugested trying and if you get stuck asking us somting more spisifck like "how do i open a file".

P.S. plz put more meaning full subject names, thx.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
mac




PostPosted: Sun Jan 12, 2003 11:35 pm   Post subject: what

yo i still don't get it help me bro
Dan




PostPosted: Mon Jan 13, 2003 12:09 am   Post subject: (No subject)

Hacker Dan wrote:
we are not going to make your game for you but we can give you some tips with the parts of your game.


what eactate part are you having a problem with?
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
mac




PostPosted: Mon Jan 13, 2003 10:52 am   Post subject: ok

ok how do i start it explain in easy words for me
Dan




PostPosted: Mon Jan 13, 2003 8:01 pm   Post subject: (No subject)

well i whode start with a titel page for the game

ex:

code:

var key:string (1)

put "this is my game ;)"
put ""
put "hit any key"
getch (key)



then you will need to say the rules and stuff this code be on the title page

ex:

code:

put "how to play"
put ""
put "stuff about how to play game"
put ""
put "hit any key"
getch (key)



now you will need to start making the game. i whode sugest starting by making the variubles you think you are going to need.

ex:

code:

var worad1: string := "turing"
var worad2: string := "swat"
var worad3: string := "dan"
var worad4: string := "tony"
var numwrong: int := 0


next you will need to start wroking on the main loop

ex
code:

var worad1: string := "turing"
var worad2: string := "swat"
var worad3: string := "dan"
var worad4: string := "tony"
var numwrong: int := 0

for i : 1 .. length (worad1)
    put "_ " ..
end for


this will put the blanks for the 1st worad. try and do the rest of your progame your self.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
mac




PostPosted: Tue Jan 14, 2003 1:00 am   Post subject: yes

yes i get it now but what is the next things i have to do bro
mac




PostPosted: Wed Jan 15, 2003 9:31 pm   Post subject: ok

help guys what is the next part to the game
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Jan 15, 2003 10:02 pm   Post subject: (No subject)

now you want to get users guess.

then check if this guess is correct or not.

if guess is correct, you display that letter

if guess is wrong, you draw one of body parts of the hangman
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
mac




PostPosted: Wed Jan 15, 2003 11:12 pm   Post subject: ok

hey how do i do that
Dan




PostPosted: Thu Jan 16, 2003 6:47 pm   Post subject: !@#$ !!!!!!

how about you post what code you have so far so we can help you better.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
mac




PostPosted: Thu Jan 16, 2003 10:55 pm   Post subject: k

i have
var key:string (1)
colour(3)
put "Welcome to hang-man the game"
put ""
put "hit any enter to play the game"
getch (key)
var worad1: string := "fun"
var worad2: string := "school"
var worad3: string := "friends"
var worad4: string := "what"
var numwrong: int := 0
var worad1: string := "fun"
var worad2: string := "school"
var worad3: string := "friends"
var worad4: string := "what"
var numwrong: int := 0
Tony




PostPosted: Fri Jan 17, 2003 8:54 am   Post subject: (No subject)

why do you have
code:

var worad1: string := "fun"
var worad2: string := "school"
var worad3: string := "friends"
var worad4: string := "what"
var numwrong: int := 0
writen 2 times?

anyway, now you got to enter the loop the get user input... then run a for loop to check if the letter is present.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
mac




PostPosted: Fri Jan 17, 2003 9:11 am   Post subject: ok

anyway, now you got to enter the loop the get user input... then run a for loop to check if the letter is present.



how do i do that
Tony




PostPosted: Fri Jan 17, 2003 4:56 pm   Post subject: (No subject)

code:

loop
getch(c)

for i:1..length(word)
if c=word(i) then
put "letter found"
end if
end for


end loop
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 15 Posts ]
Jump to:   


Style:  
Search: