Beginner Text Based Game Location Handling Help

crazed8s

New member
Joined
Mar 18, 2009
Messages
1
Programming Experience
Beginner
I am just for learning purposes trying to develop a one player text based game.

I have a rich text box (GameWindow)
I have a text box (InputWindow)
I have a button (InputButton)
and a bunch of labels that aren't really important

I have two questions

first is easy probably. How do i get InputWindow to respond to me hitting enter when text is in it?

second.
What is the best way to handle location and movement. Right now i only have 3 places so it was really easy to just do

If loc = 0
If InputWindow.text = left
then
loc = 0

something like that.



But if i plan to have more that is only going to increase the size and code needed and im sure there is an easier way i just don't know how to do it.
 
VB.NET:
Private Sub InputTextBox_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles InputTextBox.KeyUp
    If e.KeyCode = Keys.Enter Then

    End If
End Sub
 
Back
Top