Results 1 to 13 of 13

Thread: Help with Mastermind application

Threaded View

  1. #5
    New Member
    Join Date
    Jan 2003
    Posts
    4
    Originally posted by BodwadUK
    Hmmm i think you mean the line in which case you need a comment mark or ' so you need the line

    '---------------------- CorrectPosition CorrectColor

    it should turn green and prevent the compiler from reading it when compiling
    Thankz BodwadUK for your input. But you get me wrong.

    What I mean is....
    Lets say the "Hidden Code" is 1234.

    If the player input "1 1 1 1"
    It will Prompt the number "1" is the Correct Number and in the Correct Position while the other three "1"s is the Correct Number but different position.

    The code i'm using...

    If InputBox1.Text = number1 Then
    Shape1.BackColor = vbGreen
    ElseIf InputBox2.Text = number2 Then
    Shape1.BackColour = vbYellow

    And so on....
    -------------------------------------------------

    If InputBox2.Text = number2 Then
    Shape1.BackColor = vbGreen
    ElseIf InputBox2.Text = number1 Then <--------- Thats The Part!
    Shape1.BackColour = vbYellow

    -------------------------------------------------

    Clear enough everyone? Thankz

    Edit: The colour of the shapes will changed to "GREEN" if the position and number is right. And the colour of the shapes will be changed to "YELLOW" if the number is correct and position is wrong
    Last edited by TikoWeide; Jan 2nd, 2003 at 08:32 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width