text replacement

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Curran

    text replacement

    Hello,

    I am writing a hangman game for my VB class and we did not cover
    string manipulation until this week, the final week. I can take in a
    word or phrase up to 30 characters and create the necessary dashes for
    the number of characters, and also display the correct letters in the
    correct spots...however I am struggling to get it to work right when I
    perform the conversion from letters to dashes to keep spaces in the
    right character locations. Should I be using 2 or more variables to
    keep things straight?

    thanks in advance,

    Mike curran
  • Evan Tomlinson

    #2
    Re: text replacement

    Hi,

    I do not understand your question, can you provide some examples of what you
    are trying to do and explain both the current result as well as the expected
    result?

    Regards


    "Mike Curran" <mike_curran@ho tmail.com> wrote in message
    news:aa85861f.0 402272157.1e515 [email protected] gle.com...
    Hello,

    I am writing a hangman game for my VB class and we did not cover
    string manipulation until this week, the final week. I can take in a
    word or phrase up to 30 characters and create the necessary dashes for
    the number of characters, and also display the correct letters in the
    correct spots...however I am struggling to get it to work right when I
    perform the conversion from letters to dashes to keep spaces in the
    right character locations. Should I be using 2 or more variables to
    keep things straight?

    thanks in advance,

    Mike curran


    Comment

    • Larry Serflaten

      #3
      Re: text replacement

      "Mike Curran" <mike_curran@ho tmail.com> wrote[color=blue]
      > Hello,
      >
      > I am writing a hangman game for my VB class and we did not cover
      > string manipulation until this week, the final week. I can take in a
      > word or phrase up to 30 characters and create the necessary dashes for
      > the number of characters, and also display the correct letters in the
      > correct spots...however I am struggling to get it to work right when I
      > perform the conversion from letters to dashes to keep spaces in the
      > right character locations. Should I be using 2 or more variables to
      > keep things straight?
      >
      > thanks in advance,[/color]


      Yes. keep one string that has the answer, and another that indicates
      how it should be displayed on the screen. After each guess, check
      to see if that guess is correct, and adjust the screen string accordingly.
      If the string for the screen ever matches the answer string, you
      know they guessed the word (or phrase).

      LfS




      -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
      http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
      -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

      Comment

      Working...