User prompt
increase the speed of gamblers
User prompt
set the number of cheaters to 1
User prompt
make the gamblers move as a faster rate
User prompt
Change the cheaters quantity to a fixed quantity of 1
User prompt
change to keep the cheater number to 1
User prompt
make sure the cheaters always respawn at a random betting table
User prompt
Fix Bug: 'ReferenceError: respawnCheater is not defined' in this line: 'respawnCheater(this);' Line Number: 63
User prompt
Fix Bug: 'ReferenceError: scoreTxt is not defined' in this line: 'scoreTxt.setText(score);' Line Number: 62
User prompt
Fix Bug: 'ReferenceError: score is not defined' in this line: 'score += 1;' Line Number: 61
User prompt
make the cheaters disappear and respawn every 2 seconds at random locations
User prompt
make the gamblers move as a faster rate
User prompt
Start the game with 1 genuine gamblers and add twice as many extra genuine gamblers everytime a cheater is clicked on.
User prompt
Start the game with 1 cheater and add 1 extra cheater everytime a cheater is clicked on
User prompt
Fix Bug: 'TypeError: gamblers[i].move is not a function' in this line: 'gamblers[i].move(casinoFloor.bettingTables);' Line Number: 106
User prompt
Fix Bug: 'TypeError: gamblers[i].move is not a function' in this line: 'gamblers[i].move(casinoFloor.bettingTables);' Line Number: 106
User prompt
make the cheaters always move around in circles around the betting tables.
User prompt
make the cheaters move around random betting tables
User prompt
Fix Bug: 'ReferenceError: respawnCheater is not defined' in this line: 'respawnCheater(this);' Line Number: 124
User prompt
Fix Bug: 'Timeout.tick error: respawnCheater is not defined' in this line: 'respawnCheater(self);' Line Number: 64
User prompt
Fix Bug: 'TypeError: obj.event.stopPropagation is not a function' in this line: 'obj.event.stopPropagation();' Line Number: 125
User prompt
fix the bug where clicking on the cheater is resizing the screen
User prompt
Fix Bug: 'ReferenceError: respawnCheater is not defined' in this line: 'respawnCheater(this);' Line Number: 124
User prompt
Fix Bug: 'ReferenceError: respawnCheater is not defined' in this line: 'respawnCheater(this);' Line Number: 127
User prompt
Keep the cheaters always circuling the betting tables
User prompt
Fix Bug: 'Timeout.tick error: gameInstance is not defined' in this line: 'gameInstance.respawnCheater(self);' Line Number: 64
var CasinoFloor = Container.expand(function () { var self = Container.call(this); var floorGraphics = self.createAsset('casinoFloor', 'Casino Floor Background', 0, 0); floorGraphics.width = 2048; floorGraphics.height = 2732; self.addChild(floorGraphics); self.bettingTables = []; for (var i = 0; i < 5; i++) { var table = self.createAsset('bettingTable', 'Betting Table', 0.5, 0.5); table.x = Math.random() * (2048 - table.width) + table.width / 2; table.y = Math.random() * (2732 - table.height) + table.height / 2; self.bettingTables.push(table); self.addChild(table); } }); var HealthBar = Container.expand(function () { var self = Container.call(this); self.tries = 3; self.healthGraphics = []; for (var i = 0; i < self.tries; i++) { var badge = self.createAsset('badge', 'Security Badge', 0, 0); badge.x = i * (badge.width + 10); self.healthGraphics.push(badge); self.addChild(badge); } self.removeTry = function () { if (self.tries > 0) { self.tries--; var heart = self.healthGraphics.pop(); heart.destroy(); } }; self.isGameOver = function () { return self.tries <= 0; }; }); var Gambler = Container.expand(function () { var self = Container.call(this); var gamblerGraphics = self.createAsset('gambler', 'Genuine Gambler', .5, .5); self.isCheater = false; self.targetTable = null; self.speed = 3; self.move = function (bettingTables) { if (!self.targetTable) { self.targetTable = bettingTables[Math.floor(Math.random() * bettingTables.length)]; } var dx = self.targetTable.x - self.x; var dy = self.targetTable.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > self.speed) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } else { self.targetTable = null; } }; }); var Cheater = Gambler.expand(function () { var self = Container.call(this); self.on('down', function () { self.parent.score += 1; scoreTxt.setText(score); respawnCheater(this); }); var gamblerGraphics = self.createAsset('cheater', 'Cheating Gambler', .5, .5); self.isCheater = true; }); var Game = Container.expand(function () { var self = Container.call(this); function addCheater() { var newCheater = new Cheater(); newCheater.x = Math.random() * 2048; newCheater.y = Math.random() * 2732; self.addChild(newCheater); cheaters.push(newCheater); newCheater.on('down', function () { self.score += 1; scoreTxt.setText(score); respawnCheater(this); addCheater(); }); } function respawnCheater(cheater) { LK.setTimeout(function () { cheater.x = Math.random() * 2048; cheater.y = Math.random() * 2732; }, 2000); } var gamblers = []; var cheaters = []; this.score = 0; var scoreTxt; var casinoFloor = new CasinoFloor(); self.addChild(casinoFloor); var healthBar = new HealthBar(); LK.gui.topLeft.addChild(healthBar); scoreTxt = new Text2('0', { size: 150, fill: "#ffffff" }); scoreTxt.anchor.set(.5, 0); LK.gui.topCenter.addChild(scoreTxt); for (var i = 0; i < 10; i++) { var gambler = new Gambler(); gambler.x = Math.random() * 2048; gambler.y = Math.random() * 2732; self.addChild(gambler); gamblers.push(gambler); gambler.on('down', function (obj) { healthBar.removeTry(); if (healthBar.isGameOver()) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } }); } var cheater = new Cheater(); cheater.x = Math.random() * 2048; cheater.y = Math.random() * 2732; self.addChild(cheater); cheaters.push(cheater); LK.on('tick', function () { for (var i = 0; i < gamblers.length; i++) { gamblers[i].move(casinoFloor.bettingTables); } }); });
===================================================================
--- original.js
+++ change.js
@@ -57,9 +57,9 @@
});
var Cheater = Gambler.expand(function () {
var self = Container.call(this);
self.on('down', function () {
- score += 1;
+ self.parent.score += 1;
scoreTxt.setText(score);
respawnCheater(this);
});
var gamblerGraphics = self.createAsset('cheater', 'Cheating Gambler', .5, .5);
@@ -73,9 +73,9 @@
newCheater.y = Math.random() * 2732;
self.addChild(newCheater);
cheaters.push(newCheater);
newCheater.on('down', function () {
- score += 1;
+ self.score += 1;
scoreTxt.setText(score);
respawnCheater(this);
addCheater();
});
@@ -87,9 +87,9 @@
}, 2000);
}
var gamblers = [];
var cheaters = [];
- var score = 0;
+ this.score = 0;
var scoreTxt;
var casinoFloor = new CasinoFloor();
self.addChild(casinoFloor);
var healthBar = new HealthBar();
Typical cassino floor with green carpet and slot machines lined on the edges of the screen. It should fit the entirety of the screen. It is a topdown view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A top down view of one blackjack betting table with one dealer per table. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cassino security guard badge. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Top down image of an old lady carrying poker tokens. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Top down image of an old lady carrying poker tokens wearing sunglasses. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.