Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math.randomseed(os.time())
- --13 Triángulo
- --14 Círculo
- --15 Cruz
- --16 Cuadrado
- blanco = color.new(255,255,255)
- secuencia = {}
- acumulador = 1
- aciertos = 0
- function añadir()
- table.insert(secuencia,math.random(13,16))
- end
- for i = 1, 4 do --añadimos 4 secuencias
- añadir()
- end
- while true do
- controls.read()
- for i = 1, #secuencia do
- screen.print(100,10+(i-1)*15,secuencia[i])
- end
- screen.print(130,10+(acumulador-1)*15,"aquí")
- screen.flip()
- if controls.waitforkey() == secuencia[acumulador] then
- os.message("Bien!")
- acumulador=acumulador+1
- else os.message("Mal")
- acumulador=1
- end
- if controls.select() then a() end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement