()
| 39 | } |
| 40 | |
| 41 | getRandomAction() { |
| 42 | let isJump = false; |
| 43 | |
| 44 | if (random() > jumpChance) { |
| 45 | isJump = true; |
| 46 | } |
| 47 | |
| 48 | let holdTime = random(0.1, 1); |
| 49 | if(random()<chanceOfFullJump){ |
| 50 | holdTime = 1; |
| 51 | } |
| 52 | |
| 53 | |
| 54 | let directions = [-1, -1, -1, 0, 1, 1, 1] |
| 55 | let xDirection = random(directions) |
| 56 | |
| 57 | |
| 58 | return new AIAction(isJump, holdTime, xDirection) |
| 59 | } |
| 60 | |
| 61 | getNextAction() { |
| 62 | if(this.currentInstructionNumber >= this.instructions.length){ |
no outgoing calls
no test coverage detected