Commit Graph

4 Commits

Author SHA1 Message Date
Quinton Lee
94016f6218 Update Typescript to 3.1 (#4879) 2018-10-05 04:02:54 -05:00
Guangcong Luo
4c0699abc6 Implement inputLog
A battle's inputLog is now stored separately from the output log. It's
not an exact log of inputs, but rather just a collection of the inputs
that resulted in the battle: a default choice expands to the choice
that was actually used, and the starting seed is logged whether or not
it was explicitly passed into the battle stream.

Fixes #4348

Fixes #3201
2018-01-28 21:23:06 -06:00
Guangcong Luo
ab1f995daa Rewrite Process Manager
Process Manager is now lib/process-manager.js

It's been entirely rewritten to reflect what I think a process manager
API should look like.

In particular, there are now two Process Managers, QueryProcessManager
and StreamProcessManager.

Pass QueryProcessManager a pure-ish query function (sync or async) that
takes a JSON value and returns a JSON value, and PM.query() will
execute that function in a subprocess, and return a Promise for its
return value.

StreamProcessManager is the same idea: Pass it a function to create an
ObjectReadWriteStream, and PM.createStream() will create a stream in a
subprocess and return a stream connected to it.
2018-01-18 03:34:16 -06:00
Quinton Lee
a0b8228592 TypeScript: Improve Sim typing (#4069)
Also improves intellisense for Visual Studio and Visual Studio Code.
2017-10-20 07:53:26 -05:00