The AI Games, bot coding challenges for programmers.Tic Tac Toe Game: 5 Steps. Now we want to program the wins, so we will name the Strings “Blue. Win” and “Red. Win” under a new Private Sub. Private Sub Round. Win_Show(sender As System. Object, e As System. The Java standard library contains a class called "Stack". Another class from Java SDK is LinkedList, which can be used as a Queue (add() and remove()).
Event. Args) Handles Me. Mouse. Move. End Sub‘This is the code that will happen when the mouse is moved.’3. ![]() Insert the following code in between the Private Sub and End Sub. Dim Blue. Win As String = Str$(Val(Blue. Win. Counter. Text) + 1)Dim Red. Win As String = Str$(Val(Red. Win. Counter. Text) + 1)‘This is the code that makes Blue. Win and Red. Win a String. If the Event happens it will add +1 score to the Player.’4. The Following code is the wins. If Oval. Shape. 1. Visible = True And Oval. Shape. 2. Visible = True And Oval. Shape. 3. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 4. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 6. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 7. Visible = True And Oval. Shape. 8. Visible = True And Oval. Shape. 9. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 1. Visible = True And Oval. Shape. 4. Visible = True And Oval. Shape. 7. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 2. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 8. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 3. Visible = True And Oval. Shape. 6. Visible = True And Oval. Shape. 9. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 1. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 9. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Oval. Shape. 3. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 7. Visible = True Then. Blue. Win. Counter. Text = Blue. Win. End If If Line. Shape. 1. Visible And Line. Shape. 3. Visible And Line. Shape. 5. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 7. Visible And Line. Shape. 9. Visible And Line. Shape. 11. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 13. Visible And Line. Shape. 15. Visible And Line. Shape. 17. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 1. Visible And Line. Shape. 7. Visible And Line. Shape. 13. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 3. Visible And Line. Shape. 9. Visible And Line. Shape. 15. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 5. Visible And Line. Shape. 11. Visible And Line. Shape. 17. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 1. Visible And Line. Shape. 9. Visible And Line. Shape. 17. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If If Line. Shape. 5. Visible And Line. Shape. 9. Visible And Line. Shape. 13. Visible = True Then. Red. Win. Counter. Text = Red. Win. End If 'Adds 1 to the Win counter if there is a 3 in a row'4. Insert the following code underneath the previous code entered: If Oval. Shape. 1. Visible = True And Oval. Shape. 2. Visible = True And Oval. Shape. 3. Visible = True Or. Oval. Shape. 4. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 6. Visible = True Or. Oval. Shape. 7. Visible = True And Oval. Shape. 8. Visible = True And Oval. Shape. 9. Visible = True Or. Oval. Shape. 1. Visible = True And Oval. Shape. 4. Visible = True And Oval. Shape. 7. Visible = True Or. Oval. Shape. 2. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 8. Visible = True Or. Oval. Shape. 3. Visible = True And Oval. Shape. 6. Visible = True And Oval. Shape. 9. Visible = True Or. Oval. Shape. 1. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 9. Visible = True Or. Oval. Shape. 3. Visible = True And Oval. Shape. 5. Visible = True And Oval. Shape. 7. Visible = True Or. Line. Shape. 1. Visible = True And Line. Shape. 3. Visible = True And Oval. Shape. 5. Visible = True Or. Line. Shape. 7. Visible = True And Line. Shape. 9. Visible = True And Line. Shape. 11. Visible = True Or. Line. Shape. 13. Visible = True And Line. Shape. 15. Visible = True And Line. Shape. 17. Visible = True Or. Line. Shape. 1. Visible = True And Line. Shape. 7. Visible = True And Line. Shape. 13. Visible = True Or. Line. Shape. 3. Visible = True And Line. Shape. 9. Visible = True And Line. Shape. 15. Visible = True Or. Line. Shape. 5. Visible = True And Line. Shape. 11. Visible = True And Line. Shape. 17. Visible = True Or. Line. Shape. 1. Visible = True And Line. Shape. 9. Visible = True And Line. Shape. 17. Visible = True Or. Line. Shape. 5. Visible = True And Line. Shape. 9. Visible = True And Line. Shape. 13. Visible = True Or. Rectangle. Shape. Enabled = False And Rectangle. Shape. 2. Enabled = False And Rectangle. Shape. 3. Enabled = False And Rectangle. Shape. 4. Enabled = False And Rectangle. Shape. 5. Enabled = False And Rectangle. Shape. 6. Enabled = False And Rectangle. Shape. 7. Enabled = False And Rectangle. Shape. 8. Enabled = False And Rectangle. Shape. 9. Enabled = False Then'These are all the possibilities of a win'Oval. Shape. 1. Visible = False. Oval. Shape. 2. Visible = False. Oval. Shape. 3. Visible = False. Oval. Shape. 4. Visible = False. Oval. Shape. 5. Visible = False. Oval. Shape. 6. Visible = False. Oval. Shape. 7. Visible = False. Oval. Shape. 8. Visible = False. Oval. Shape. 9. Visible = False. Line. Shape. 1. Visible = False. Line. Shape. 2. Visible = False. Line. Shape. 3. Visible = False. Line. Shape. 4. Visible = False. Line. Shape. 5. Visible = False. Line. Shape. 6. Visible = False. Line. Shape. 7. Visible = False. Line. Shape. 8. Visible = False. Line. Shape. 9. Visible = False. Line. Shape. 10. Visible = False. Line. Shape. 11. Visible = False. Line. Shape. 12. Visible = False. Line. Shape. 13. Visible = False. Line. Shape. 14. Visible = False. Line. Shape. 15. Visible = False. Line. Shape. 16. Visible = False. Line. Shape. 17. Visible = False. Line. Shape. 18. Visible = False'Makes all Circles and Crosses Invisible'Rectangle. Shape. 1. Enabled = True. Rectangle. Shape. Enabled = True. Rectangle. Shape. 3. Enabled = True. Rectangle. Shape. Enabled = True. Rectangle. Shape. 5. Enabled = True. Rectangle. Shape. Enabled = True. Rectangle. Shape. 7. Enabled = True. Rectangle. Shape. Enabled = True. Rectangle. Shape. 9. Enabled = True 'This Enables the Boxes again'End If 'If there is a win then the game board is reset'4. Debug the game and fix any errors found. Kids Play Park - Kids Games. Colorful Shape Making Game- New. Stamp out your own colorful shapes. Learn basic shapes while creating a piece of art. To begin hit START, and then select a shape at the bottom. Click the mouse in the scene to create the 1. Great for kids learning to use the mouse or for kids who just want to be creative and learn basic shape. You can print out the colorful creation. Skills used: Creativity, coordination, learning basic computer skills, Learning the mouse, hand and eye coordination, Art. Fish World! - New. Create your own fish tank by using your mouse to stamp out your own fish. To begin hit START, and then select one picture shown at the bottom. Click the mouse in the scene to create your fish tank. This is a great way for kids learning to use the mouse. When you're finished being creative print out your masterpiece! Skills used: Creativity, coordination, learning basic computer skills, Learning the mouse, hand and eye coordination, Art.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |