Corewar Developer Reference

This area of the docs will provides a technical reference for the corewar npm package.

The Corewar library provides a redcode parser, corewar simulator and hill and benchmark functionality and is used by

The Corewar library provides an API to access the libraries functionality. The library uses a pubsub mechanism to publish messages in resopnse to events within the simulator.


The Corewar API is divded into the following sections:


Corewar is written in Typescript packaged using webpack and built by running:

npm build


Corewar is extensively unit tested using Mocha, Chai, Sinon and sinon-chai. Code coverage is supplied using Istanbul.

Corewar contains unit tests for the Parser, Simulator and Matches APIs along with integration tests for the Parser.

To execute the tests and see code coverage run:

npm test

Unit test debugging is configured to run in VS Code