Example #1
0
        public StreamHandler(object self, CommandDefinitions definitions, ILog log)
        {
            var target = new CommandExecutor(self, log);

            foreach (var definition in definitions.Definitions)
            {
                target.Define(definition.Key, definition.Value);
            }
            receiver      = new ExecutorPacketReceiver(target, log);
            receiveStream = new ReceiveStream(receiver, log);
        }
 public void Init()
 {
     state    = new GameState();
     executor = new CommandExecutor <GameState>(state);
     executor.Define(32, "AnsweredCorrectly");
 }