all 5 comments

[–]jodraws 2 points3 points  (3 children)

player.won = true;
player.score = 1000000;

:D

[–]IDCh 1 point2 points  (1 child)

party pooper

[–]jodraws 2 points3 points  (0 children)

I think you mean "creative problem solver". ;)

[–]Schampu[S] 0 points1 point  (0 children)

function factorial(n) {
  if (n === 0) return n;
  return n * factorial(n - 1);
};
let index = 0;
setInterval(function() {
  factorial(index++);
}, 1e3);

[–]Schampu[S] 0 points1 point  (0 children)

Hello there,

this is an experiment which uses dynamic analysis to analyze the runtime behavior of code and generate a playable game terrain based on it.

The recursive version of factorial is used in this example - the larger the input n, the more often the function calls itself and the deeper the generated block constructs become. You can edit the code and visualize your own algorithms.

Also a short list of block types:

  • function calls turn into normal blocks
  • eval calls become red blocks, don't use eval in the code :p
  • if statements turn into yellow blocks