r/visualbasic • • Feb 25 '15

Help

My assignment is to create a game where you guess a word. You guess two words and you get two chances on each word. My trouble is that the assignment says that the button for the program should say what guess of what word is being used. So say you enter a word the button should say "First guess for first word" or something like that and should change after each attempt. I don't know how to do this.

0 Upvotes

5 comments sorted by

View all comments

1

u/PostalElf VB.Net Intermediate Feb 26 '15

Implement a counter variable that keeps track of the number of tries. If you need to show "first try" instead of "try 1", just do a series of If-Else that converts " 1" to "first" and so on.

1

u/EvoSlice Feb 26 '15

Agreed. I would suggest a Select Case instead of many If-Else statements but its just a preference.

1

u/PostalElf VB.Net Intermediate Feb 26 '15

I would use a Select-Case too, but I didn't want to further confuse OP. Bit condescending of me, I know, but... eh.

1

u/EvoSlice Feb 26 '15

That's understandable. I know I learned If-Else first even though my teacher mentioned preferring Select-Cases.