Commit Graph

5 Commits

Author SHA1 Message Date
Kirk Scheibelhut
b2777f9bf6 Remove |callback| in favor of |error| (#5418) 2019-04-09 03:33:32 +08:00
Kirk Scheibelhut
564dae455d Make Battle throw on choice errors in tests (#5286) 2019-03-21 13:14:38 +09:00
Guangcong Luo
7d8d47c97c Refactor BattleEngine
Battle is now an ES6 class... mostly... it's complicated.

Battle's inheritance system has always been a mess. I tried to redo it
in a sensible way but it caused nondeterministic test failures. Not
even kidding; different things would fail each time I ran tests, even
without code changes. I'll investigate closer later, but this refactor
makes it use ES6 classes with only a small amount of hacking, which is
good enough. It is, at the very least, simpler than the previous mess.

BattleEngine.Battle.construct has been renamed BattleEngine.construct.
2016-10-22 23:11:26 -05:00
Ben Davies
54d0ff203a Performance: replace direct references to arguments with rest parametres (#2818)
Replacing direct references to the arguments object of functions with rest
parametres prevents the function from being deoptimized while still allowing
use of arbitrary arguments. This may also fix some minor memory leaks related
to mishandling the arguments object.
2016-10-04 16:29:14 -07:00
Ivo Julca
2ab2937b3c Implement assert extensions to enhance the test suite 2016-06-15 08:54:18 -05:00