MultiRogue Dev Log – Milestone & Mocha

I’ve reached a fairly important milestone today. My application now has the right adapters for making very understandable and predicable test suits. Here’s an example:


var testAdapter = new TestUIAdapter();
var server = new GameServer(new ServerParameters(null, 19582923));
var client = new GameClient(new ClientParameters(null, server.getMessageServer()), testAdapter);
client.handleCommand(new ShoutCommand('test'));

//OUTPUT:
/*
 [ { message: 'You\'re now connected as Player #101!',
    tag: 'info' },
  { message: 'It\'s your turn. You have 4 actions left.',
    tag: 'success' },
  { message: 'You shout "test"!!', tag: undefined },
  { message: 'You have 3 actions left.', tag: undefined } ]
*/

My next goal is to use Mocha.js to make some real tests suits, and integrate the tests with my grunt build script so that it can give me a pass/fail status.


2 Responses to “MultiRogue Dev Log – Milestone & Mocha”

  1. Loopywolf September 22, 2015 at 3:06 pm # Reply

    Aiming to make a multi-player rogue entirely in JS?

    • MichelCarroll September 24, 2015 at 8:14 am # Reply

      That’s the plan

Leave a Reply