User prompt
make the villager alway move
User prompt
the villager have to alway move
User prompt
Fix Bug: 'ReferenceError: villagers is not defined' in this line: 'var villagerB = villagers[j];' Line Number: 251
User prompt
Fix Bug: 'ReferenceError: villagers is not defined' in this line: 'var villagerA = villagers[i];' Line Number: 250
User prompt
Fix Bug: 'ReferenceError: villagers is not defined' in this line: 'for (var j = i + 1; j < villagers.length; j++) {' Line Number: 249
User prompt
Fix Bug: 'ReferenceError: villagers is not defined' in this line: 'for (var i = 0; i < villagers.length; i++) {' Line Number: 248
User prompt
Fix Bug: 'ReferenceError: villagers is not defined' in this line: 'for (var i = 0; i < villagers.length; i++) {' Line Number: 327
User prompt
Fix Bug: 'TypeError: self.updateResourceDisplay is not a function' in this line: 'self.updateResourceDisplay();' Line Number: 322
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'villagerCountText.setText('Villagers: ' + self.villagers.length);' Line Number: 236
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'villagers')' in this line: 'self.villagers = game.villagers;' Line Number: 226
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'villagerCountText.setText('Villagers: ' + villagers.length);' Line Number: 235
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'villagerCountText.setText('Villagers: ' + villagers.length);' Line Number: 235
User prompt
Fix Bug: 'ReferenceError: villagerCountDisplay is not defined' in this line: 'villagerCountDisplay.update();' Line Number: 318
User prompt
Fix Bug: 'ReferenceError: villagerCountDisplay is not defined' in this line: 'villagerCountDisplay.update();' Line Number: 318
User prompt
Fix Bug: 'TypeError: self.updateVillagerCountDisplay is not a function' in this line: 'self.updateVillagerCountDisplay();' Line Number: 318
User prompt
Fix Bug: 'Uncaught ReferenceError: workplaces is not defined' in this line: 'workplaces.push(workplace);' Line Number: 315
User prompt
Fix Bug: 'Uncaught ReferenceError: workplaces is not defined' in this line: 'workplaces.push(self.createAndAddWorkplace());' Line Number: 306
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.workplaces.push(workplace);' Line Number: 302
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.houses.push(house);' Line Number: 292
User prompt
Fix Bug: 'Uncaught ReferenceError: villagers is not defined' in this line: 'villagers.push(self.createAndAddVillager(1024, 1366));' Line Number: 284
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'this.villagers.push(villager);' Line Number: 280
User prompt
improve all the code in 20 pass
User prompt
improve all the code in 10 pass
User prompt
improve all the code
User prompt
improve 8 time
===================================================================
--- original.js
+++ change.js
@@ -97,19 +97,11 @@
self.targetY = y;
if (state) self.state = state;
};
self.update = function () {
- if (!self.isDoingSomething()) {
- if (self.workplace) {
- self.moveTo(self.workplace.x, self.workplace.y, 'goingToWork');
- } else if (self.home) {
- self.moveTo(self.home.x, self.home.y, 'goingHome');
- } else {
- var randomX = Math.random() * 2048;
- var randomY = Math.random() * 2732;
- self.moveTo(randomX, randomY, 'wandering');
- }
- }
+ var randomX = Math.random() * 2048;
+ var randomY = Math.random() * 2732;
+ self.moveTo(randomX, randomY, 'wandering');
switch (self.state) {
case 'goingToWork':
if (self.workplace && self.workplace.x != null && self.workplace.y != null) {
self.moveTowards(self.workplace.x, self.workplace.y);
A background of a paysage with plain and without tree or montainbut no water see from the top in the air 100m by 100m Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
One human medieval villager in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a house in a warcraft 2 style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree a rock and crambery in a RTS style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A heart comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cloud in a comic style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A market in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An Inn in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An school in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An bakery in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A well in a RTS fantasy style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A tree in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An apple in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A rock in a rts style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A home in a RTS and fantasy style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A brewery in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A lumberjack in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a marketplace in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a festival in a fantasy rts style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.