Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC110 Steven Battilana 1 CSC110 Fundamentals of CSC L3P3 Winning Streak Using VBSA.

Similar presentations


Presentation on theme: "CSC110 Steven Battilana 1 CSC110 Fundamentals of CSC L3P3 Winning Streak Using VBSA."— Presentation transcript:

1 CSC110 Steven Battilana 1 CSC110 Fundamentals of CSC L3P3 Winning Streak Using VBSA

2 CSC110 Steven Battilana 2 How It Works (Load) NEW: Clears the ListBox, then adds in the word FLIPS.

3 CSC110 Steven Battilana 3 How It Works (Flip Coin) flipCoin third Picture1 (Num before WAIT) WAIT List2.index = third (Num after WAIT) ‘1 = HEADS, 2 = TAILS SELECT CASE List2 CASE 1 List1.Add = HEADS CASE 2 List1.Add = TAILS CASE ELSE END SELECT ‘Multiply all three together product = first * second product = product * third IF product = 1 THEN MsgBox 3 HEADS in a row – HEADS wins!!! END ELSE ENDIF IF product = 8 THEN MsgBox 3 TAILS in a row – TAILS wins!!! END ELSE ENDIF ‘Prepare for the next flip first = second second = third ‘Try again! Before WAIT & After

4 CSC110 Steven Battilana 4 How It Works (Flip Coin) flipCoin third Picture1 (Num before WAIT) WAIT List2.index = third (Num after WAIT) ‘1 = HEADS, 2 = TAILS SELECT CASE List2 CASE 1 List1.Add = HEADS CASE 2 List1.Add = TAILS CASE ELSE END SELECT ‘Multiply all three together product = first * second product = product * third IF product = 1 THEN MsgBox 3 HEADS in a row – HEADS wins!!! END ELSE ENDIF IF product = 8 THEN MsgBox 3 TAILS in a row – TAILS wins!!! END ELSE ENDIF ‘Prepare for the next flip first = second second = third ‘Try again! Before WAIT & After

5 CSC110 Steven Battilana 5 How It Works (Flip Coin) flipCoin third Picture1 (Num before WAIT) WAIT List2.index = third (Num after WAIT) ‘1 = HEADS, 2 = TAILS SELECT CASE List2 CASE 1 List1.Add = HEADS CASE 2 List1.Add = TAILS CASE ELSE END SELECT ‘Multiply all three together product = first * second product = product * third IF product = 1 THEN MsgBox 3 HEADS in a row – HEADS wins!!! END ELSE ENDIF IF product = 8 THEN MsgBox 3 TAILS in a row – TAILS wins!!! END ELSE ENDIF ‘Prepare for the next flip first = second second = third ‘Try again! Before WAIT & After


Download ppt "CSC110 Steven Battilana 1 CSC110 Fundamentals of CSC L3P3 Winning Streak Using VBSA."

Similar presentations


Ads by Google