MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / constructor

Method constructor

Brain.js:27–33  ·  view source on GitHub ↗
(size, randomiseInstructions = true)

Source from the content-addressed store, hash-verified

25class Brain {
26
27 constructor(size, randomiseInstructions = true) {
28 this.instructions = [];
29 this.currentInstructionNumber = 0;
30 if (randomiseInstructions)
31 this.randomize(size);
32 this.parentReachedBestLevelAtActionNo = 0;
33 }
34
35 randomize(size) {
36 for (let i = 0; i < size; i++) {

Callers

nothing calls this directly

Calls 1

randomizeMethod · 0.95

Tested by

no test coverage detected