Click here to Skip to main content
       

Visual Basic

 
AnswerRe: IOException was Unhandled PinmemberMike Meinz22-Jan-13 3:15 
GeneralTo calculate with two - three & four criteria multiple worksheet in summary sheet Pinmemberatulkhandekar3-Jan-13 21:42 
AnswerRe: To calculate with two - three & four criteria multiple worksheet in summary sheet PinmemberEddy Vluggen4-Jan-13 22:48 
GeneralRe: To calculate with two - three & four criteria multiple worksheet in summary sheet Pinmemberatulkhandekar7-Jan-13 1:46 
AnswerRe: To calculate with two - three & four criteria multiple worksheet in summary sheet PinmvpEddy Vluggen7-Jan-13 1:57 
GeneralRe: To calculate with two - three & four criteria multiple worksheet in summary sheet PinmvpRichard MacCutchan7-Jan-13 6:39 
GeneralRe: To calculate with two - three & four criteria multiple worksheet in summary sheet PinmemberShailesh Shah12-Jan-13 19:20 
Questionwhich method I should go with Pinmemberdemo 22-Jan-13 19:54 
Hi guys I have little bit Complex Algorithm to solve my little application using IF function.
 
I'm working on a little game using VB for that.
 
I have 12 buttons 3*4 three column and four rows. imagine these buttons as river and in the left or on the right side of the river there is a man would like to cross the river using these buttons as bridge.
 
the basic idea is if user presses the button there is message will show a question Yes or NO. if the answer is correct button turned to green otherwise will be blue if the answer incorrect.
 
 Public Class Form1
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim x = MsgBox("moon is biger than Sun", MsgBoxStyle.YesNo)
        If x = DialogResult.Yes Then
            Button1.BackColor = Color.Blue
        Else
            Button1.BackColor = Color.Green
        End If
    End Sub
End

 

[Button 1] [Button 2] [Button 3]
[Button 4] [Button 5] [Button 6]
[Button 7] [Button 8] [Button 9]
[Button10] [Button11] [Button12]
 
case 1:
the player can go from 1 to 3 horizontal
also allowed to go diametrical or free direction like : 10 and then 7 and then 8 and then 9 OR
 
Case 2:
from 7 and then 9 and then back to 8 .
 

 

Case 3:
or 10 to 8 to 5 to 3
 
case 4:
9 to 5 to 7
 

a lot if cases players can goes with to win
 
Finally
a message will show up ( the player win if he answers correctly )
 
this is my Big problem I have to study all the case and using IF
 
not the correct method also I cant go with Switch method
 

then I found out I have to use math Algorithm ..
 
each button has value like button1 take 10 value if the answer correct and button2 takes 20 and button3 takes 30 value.
 
by this way I can use IF function or switch ...
because if the total comes to 60 the player will win
 
but still Complex Algorithm for me
 

what I should do if the player has free directions to win .
 
Player has random choosing
 

I got headache to just think how can I solve probabilities that user may use it to win.
 

I know that to make my life easy just I have to make rules but I try to challenge my self with open direction how can I solve this problem
AnswerRe: which method I should go with PinmemberEddy Vluggen4-Jan-13 22:51 
Questionvb6 with ms access2007 database Pinmembertuticorinmano2-Jan-13 9:58 
AnswerRe: vb6 with ms access2007 database PinmemberDavid Mujica2-Jan-13 10:26 
GeneralRe: vb6 with ms access2007 database Pinmembertuticorinmano2-Jan-13 12:49 
QuestionShould be simple: incompatible types PinmemberAndreFratelli1-Jan-13 7:44 
AnswerRe: Should be simple: incompatible types PinmemberAndreFratelli2-Jan-13 0:27 
GeneralRe: Should be simple: incompatible types PinmemberGuyThiebaut7-Jan-13 22:34 
Questiondatagrid in vs 2012 Pinmemberjenkinsdjj30-Dec-12 20:22 
AnswerRe: datagrid in vs 2012 PinmvpRichard MacCutchan30-Dec-12 22:29 
GeneralRe: datagrid in vs 2012 Pinmemberjenkinsdjj31-Dec-12 0:40 
QuestionGetting innertext of HTML with </ br> tag between words PinmemberStonesteel26-Dec-12 22:57 
AnswerRe: Getting innertext of HTML with </ br> tag between words PinmvpDave Kreskowiak27-Dec-12 8:49 
GeneralRe: Getting innertext of HTML with </ br> tag between words PinmemberStonesteel27-Dec-12 21:04 
GeneralRe: Getting innertext of HTML with </ br> tag between words PinmvpDave Kreskowiak28-Dec-12 4:41 
Questionthreading impliment PinmemberMichael Hulak25-Dec-12 17:58 
AnswerRe: threading impliment PinmemberDineshshp25-Dec-12 18:32 
AnswerRe: threading impliment PinmemberEddy Vluggen26-Dec-12 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 17 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid