Simplyfied the code. Ready to rebuild on top of.

This commit is contained in:
unknown
2023-08-20 16:31:21 +02:00
parent 15c86d3c14
commit ae3812aa83
10 changed files with 71 additions and 137 deletions

View File

@@ -1,15 +0,0 @@
module.exports = {
setup: function () { Room.prototype = _Room.prototype; }
}
class _Room extends Room {
// Initialize the room object
init() {
// Initialize memory
if (this.memory.state == undefined) this.memory.state = ROOMSTATE_NEUTRAL;
// Start game when spawn is in neutral room make it the capital.
if (this.controller.my && this.memory.state == ROOMSTATE_NEUTRAL) this.memory.state = ROOMSTATE_CAPITAL;
}
}