954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

hangman game in VB console application

i want some help i have this progamm and i want to add points when a letter is found 10 points PLZ HELP ME! i also want to make it for two players

Module Module1

Public zoes As Byte
Sub Main ()
Dim un As String
un = Console.ReadLine()
Dim word As String = un
Dim word As String 'Initialize the secret word Computer
Dim display As String = MakeDisplay (word)
Dim letter As String
If word <> "end" Or word <> "End" Then
Console.Write ("Please enter keyword")
word = Console.ReadLine ()
End If

zoes = Len (word) - 2 '
Do
Console.WriteLine ("Give a timetable for the word" & display)
letter = Console.ReadLine
Call FindLetters (word, letter, display)
Loop Until (word = display) Or zoes = 0

Console.ReadLine ()
End Sub

Public Function MakeDisplay (ByVal w As String) As String
Dim display As String, c As Byte
display = Left (w, 1)
For c = 2 To Len (w) - 1
display = display & "-"
Next
display = display & Right (w, 1)
Return display
End Function

Public Sub FindLetters (ByVal w As String, ByVal letter As String, ByRef display As String)

Dim c As Byte, found As Boolean
found = False
For c = 2 To Len (w) - 1
If Mid (w, c, 1) = letter Then
display = Left (display, c - 1) & letter & Right (display, Len (display) - c)
found = True
End If
Next
If Not found Then
Console.WriteLine ("There is the letter" & letter)
zoes -= 1
Else
Console.WriteLine ("Good Guessing the letter" & letter)
End If
Console.WriteLine ("Do you still" & zoes & "lives!")
If zoes = 0 Then Console.WriteLine ("Sorry you lost! The game will end!")
End Sub
End Module

superheroo
Newbie Poster
1 post since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

put code tag around your code please

bluehangook629
Posting Whiz in Training
204 posts since Dec 2009
Reputation Points: 11
Solved Threads: 14
 

If you would be able to write your program design in full psuedo code, then i will be more than happy to write this out in full for you, and i have access to College tutors who teach VB.net who will be able to help with the debugging and testing.

So if you are interested please message me the psudo code and/or a rough testtable.

Also if you require help with the psuedo code, PM me and again i will be more than happy to help.

~KG171~

KingGold171
Newbie Poster
10 posts since Sep 2011
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: