Object
|
Event
|
Task
|
Psuedocode
|
btnRock
|
Left Mouse Click on button
|
Show picture of rock in Player Picture Box
Choose Rock, Paper or Scissors to show in Computer Picture Box
|
Display picRock in rectPlayer
Generate random number between 1-3 If it’s 1, display picRock in rectCPU If it’s 2, display picPaper in rectCPU If it’s 3, display picScissors in rectCPU |
btnPaper
|
Left Mouse Click on button
|
Show picture of Paper in Player Picture Box
Choose Rock, Paper or Scissors to show in Computer Picture Box
|
Display picPaper in rectPlayer
Generate random number between 1-3 If it’s 1, display picPaper in rectCPU If it’s 2, display picRock in rectCPU If it’s 3, display picScissors in rectCPU |
btnScissors
|
Left Mouse Click on button
|
Show picture of Scissors in Player Picture Box
Choose Rock, Paper or Scissors to show in Computer Picture Box
|
Display picPaper in rectPlayer
Generate random number between 1-3 If it’s 1, display picScissors in rectCPU If it’s 2, display picPaper in rectCPU If it’s 3, display picRock in rectCPU |
btnReset
|
Left Mouse Click on button
|
Remove all scores shown on screen
|
Clear all text in txtP_Score and txtAI_Score
|
btnExit
|
Left Mouse Click on button
|
Exit Program
|
Exit program
|
txtTitle
|
|||
txtP_Score
|
Display score for Player
|
||
txtAI_Score
|
Display score for Computer
|
||
rectPlayer
|
When displays picPaper
If rectCPU shows picRock Add 1 to txtP_Score When displays picRock If rectCPU shows picScissors Add 1 to txtP_Score When displays picScissors If rectCPU shows picPaper Add 1 to txtP_Score |
||
rectCPU
|
When displays picPaper
If rectPlayer shows picRock Add 1 to txtAI_Score When displays picRock If rectPlayer shows picScissors Add 1 to txtAI_Score When displays picScissors If rectPlayer shows picPaper Add 1 to txtAI_Score |
Thursday, August 30, 2012
TOE Chart w/ Psudeocode- Paper Scissors Rock!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment