This is the code that I am working on. I got the whole ai part down. I was wondering how I could implement the step method. Every way I have done it so far has given errors. The update() function is called every 1/60 of a second. I wanted it to run there to make the decision to flap or not. Right now I get this error.
Uncaught (in promise) TypeError: Cannot read property 'randomOutput' of undefined
https://repl.it/@NicholasFicara/Flappy-AI
This is the code that I am working on. I got the whole ai part down. I was wondering how I could implement the step method. Every way I have done it so far has given errors. The update() function is called every 1/60 of a second. I wanted it to run there to make the decision to flap or not. Right now I get this error.
Uncaught (in promise) TypeError: Cannot read property 'randomOutput' of undefined
Thanks