Too my mind, less complex but more meaningful code is an important objective for the project. If thereâs any reason for your version, feel free to teach me!
@ Gus, since youâre just learning VB.NET Iâll mention the With statement in case youâre not familiar. It is one feature that I would love to see come to C#. The above could be written asâŚ
Public Module Module1
Sub Main()
....
While (BrainPad.LOOPING)
With BrainPad
.TrafficLight.RedLightOn()
.Wait.Seconds(0.5)
.TrafficLight.RedLightOff()
.Wait.Seconds(0.5)
End With
End While
End Sub
End Module
Of course, you could move the With to the top of the Sub and avoid typing âBrainpadâ on all the other lines, too. Perhaps this causes more confusion for beginners than its worth but it is one advantage of the language.