26 lines
640 B
JavaScript
26 lines
640 B
JavaScript
const creepClass = require("Creep");
|
|
const roomClass = require("Room");
|
|
const spawnClass = require("Spawn");
|
|
|
|
// ########################################
|
|
// ########## SYSTEM ##########
|
|
// ########################################
|
|
|
|
module.exports = {
|
|
|
|
setup: function () {
|
|
creepClass.setup();
|
|
roomClass.setup();
|
|
spawnClass.setup();
|
|
},
|
|
|
|
begin: function () {
|
|
Object.values(Game.rooms).forEach(room => room.begin());
|
|
Object.values(Game.creeps).forEach(creep => creep.begin());
|
|
},
|
|
|
|
tick: function () {
|
|
Object.values(Game.rooms).forEach(room => room.tick());
|
|
Object.values(Game.creeps).forEach(creep => creep.tick());
|
|
}
|
|
} |