For a school project we were asked to design an 'education game' and I have thought of an idea, but am confused as to how to code it in Visual Basic. For my game there are 10 objects that move from left to right of the playing screen one at a time at set intervals and the player has to solve one randomly generated equation for each object before it reaches the end of the playing screen. How would I go about programming this?
This is the code that I have attempted so far, having the level change once the snakecount = 0
Public Class frmGame
Dim SnakeCount As Integer
Dim Score As Integer
Dim Lives As Integer
Dim Level As Integer
Dim Objects(9) As Integer
Private Sub frmGame_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
While Level = 1
Objects(0) = Rnd() + Rnd()
Objects(1) = Rnd() - Rnd()
Objects(2) = Rnd() - Rnd()
Objects(3) = Rnd() * Rnd()
Objects(4) = Rnd() + Rnd()
Objects(5) = Rnd() * Rnd()
Objects(6) = Rnd() + Rnd()
Objects(7) = Rnd() - Rnd()
Objects(8) = Rnd() + Rnd()
Objects(9) = Rnd() * Rnd()
End While
End Sub
The greatest difficulty I'm having at the moment is assigning random integers to each element of the array and displaying them as an equation for the user to see and then solve
Any help or advice is greatly appreciated!! :)