HELP! Simon Says
lynnhh
Posts: 10
I am trying to make a Simon says game and I have attached my code. I am not getting it the code to do a random sequence of lights, Any help?
Comments
Simon is a great coding challenge, looks like a school lab. Your code has several issues, looks like a work in progress. For instance, you are randomizing SEED twice here:
DO WHILE (IN1=0) AND (IN5=0) AND (IN9=0) AND (IN13=0)
seed = seed + 1
LOOP
FOR k = 0 TO 9
RANDOM seed
array (k) = seed //4
DEBUG ? array
NEXT
Please add some comments to your code so we can see what you hope to do.
For starters, try this mod to get a random number 0-3 based on how long any button is pressed:
FOR k = 0 TO 9
DO WHILE (IN1=0) AND (IN5=0) AND (IN9=0) AND (IN13=0)
seed = seed + 1
LOOP
array (k) = seed //4
DEBUG ? array(k)
NEXT