ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues
ThinkaDot Program Issues ThinkaDot Program Issues
ThinkaDot Program Issues
Go Back  Xtreme Visual Basic Talk > > > ThinkaDot Program Issues


Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2012, 06:24 PM
MTGriz MTGriz is offline
Newcomer
 
Join Date: Jul 2012
Posts: 2
Default ThinkaDot Program Issues


I'm trying to get my right button to changes my dots to blue and reset button to clear all dots back to yellow(which I originally started). Any suggestions would be great...as I'm almost done...just those 2 issues....Here is what I have for my left and middle buttons...they work fine...just that right and reset button I'm having troubles coding...thanks

Code:
    Private Sub LeftButton_Click_1(sender As System.Object, e As System.EventArgs) Handles LeftButton.Click
        If Flipper1.droppedLeft Then
            Flipper1.flip() ' Flip to change the dot to blue.
            Flipper6.flip() ' Flip to change the dot to blue.
        Else
            ' If the dot is blue...
            Flipper1.flip() ' Flip to change the dot to yellow
            If Flipper4.droppedLeft Then 'If the dot is yellow, go left to Flipper 6.
                Flipper4.flip() ' If the dot is yellow flip to blue
                Flipper6.flip() ' If the dot is yellow flip to blue
            Else ' If the dot is blue, go to the right to Flipper 7
                Flipper4.flip()
                Flipper7.flip()

            End If

        End If
    End Sub

    Private Sub MiddleButton_Click(sender As System.Object, e As System.EventArgs) Handles MiddleButton.Click
        If Flipper2.droppedLeft Then ' The dot will become yellow going to the left side.
            Flipper2.flip() ' The dot changes to blue.
            If Flipper4.droppedLeft Then ' The dot will become yellow going to the left.
                Flipper4.flip() ' The dot will become blue.
                Flipper6.flip() ' The dot will become blue.
            Else ' If the dot is blue...
                Flipper7.flip()
                Flipper4.flip()

            End If
        Else ' If the dot is blue...
            Flipper2.flip() ' The dot will become yellow
            If Flipper5.droppedLeft Then ' The dot will become blue if it were yellow.
                Flipper5.flip() ' The dot will  become blue going to the left.
                Flipper6.flip() ' The dot will become blue.
            Else ' If the dot is blue....
                Flipper5.flip()
                Flipper8.flip()
            End If
        End If
    End Sub


Private Sub RightButton_Click(sender As System.Object, e As System.EventArgs) Handles RightButton.Click
        If Flipper3.droppedLeft Then ' If dot is yellow, go to the left and turn the dot blue.
            Flipper3.flip() ' The dot changes to blue.
            Flipper8.flip() ' The dot changes to blue.

        Else ' If the dot is blue....
            Flipper3.flip() ' The dot changes to yellow.


        End If

* I started with the right button, but can't seem to get it to go...Help would be great...thanks.

Last edited by passel; 07-23-2012 at 09:17 PM.
Reply With Quote
  #2  
Old 07-23-2012, 10:06 PM
passel's Avatar
passelThinkaDot Program Issues passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,028
Default

I hadn't heard of Thinkadot, and I'm not going to try to verify your logic, but...
assuming that your LeftButton logic is correct, then I would think that the RightButton logic would be the mirror image.
That is, since the left side deflects toward the center when the top left flipper is blue,
the right side deflects toward the center when the top right flipper is yellow.
So, yellow wouldn't go down the right side (3,8), blue would.

Instead of nesting the logic for the whole path traveled for each of the three top row inputs, I think it would be easier to have each of the eight flippers point to the two possible outputs.
You would then simply "drop" the marble in one of the three top flippers, and it simply directs you to one of the two possible outputs, which in turn would direct you to possibly two outputs, and then you would be out.

But I could be wrong. Perhaps the rules aren't as simple as two path out of a signal node based on the color of the node itself. If adjacent nodes can influence a node so that blue and yellow switch deflection direction, then there is more to it.

Based on the names you've mentioned, and googling, it seems this is likely a school assignment as others have asked similiar questions before, so we'll have to let you get back to it, since we don't want to end up doing the work for you.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.

Last edited by passel; 07-23-2012 at 10:24 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues ThinkaDot Program Issues
ThinkaDot Program Issues
ThinkaDot Program Issues
 
ThinkaDot Program Issues
ThinkaDot Program Issues
 
-->