Example #1
0
 init: function(parameters) {
     'use strict';
     var battle;
     this.id = parameters.id;
     battle = new sh.Battle({
         id: this.id,
         turnDuration: 4000
     });
     _.each(parameters.shipJsons, function(json) {
         battle.addShip(new sh.Ship({json: json}));
     });
     this.battleModel = battle;
 },
Example #2
0
 _.each(parameters.shipJsons, function(json) {
     battle.addShip(new sh.Ship({json: json}));
 });