User prompt
Call place mines with 10
User prompt
Fix Bug: 'ReferenceError: Can't find variable: NumberTile' in this line: 'var number = new NumberTile(self.neighborMines);' Line Number: 20
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'this.scale.y')' in this line: 'var cellY = Math.floor(pos.y / Cell.prototype.height);' Line Number: 124
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'this.scale.x')' in this line: 'var cellX = Math.floor(pos.x / Cell.prototype.width);' Line Number: 123
User prompt
Progress the development of the game please
User prompt
You can’t change texture in LK please just hide exciting backgound and show another asset. Use a label to show the mine state
User prompt
Fix Bug: 'TypeError: cellGraphics.setTexture is not a function. (In 'cellGraphics.setTexture('number_' + self.neighborMines)', 'cellGraphics.setTexture' is undefined)' in this line: 'cellGraphics.setTexture('number_' + self.neighborMines);' Line Number: 17
User prompt
Fix Bug: 'ReferenceError: Can't find variable: cellGraphics' in this line: 'var cellX = Math.floor(pos.x / cellGraphics.width);' Line Number: 107
User prompt
Fix Bug: 'ReferenceError: Can't find variable: cellGraphics' in this line: 'cell.x = x * cellGraphics.width;' Line Number: 48
User prompt
Progress the development of the game please
User prompt
Progress the development of the game please
Initial prompt
Minesweeper
var Cell = Container.expand(function () { var self = Container.call(this); var cellGraphics = self.createAsset('cell', 'Cell Graphics', .5, .5); self.isMine = false; self.isRevealed = false; self.neighborMines = 0; self.reveal = function () {}; self.placeMine = function () {}; self.calculateNeighborMines = function () {}; }); var Board = Container.expand(function () { var self = Container.call(this); var boardGraphics = self.createAsset('board', 'Board Graphics', .5, .5); self.cells = []; self.generateBoard = function () {}; self.revealCell = function (x, y) {}; self.placeMines = function () {}; self.calculateAllNeighborMines = function () {}; }); var Game = Container.expand(function () { var self = Container.call(this); var board = self.addChild(new Board()); var gameOver = false; board.generateBoard(); board.placeMines(); board.calculateAllNeighborMines(); self.on('down', function (obj) { var pos = obj.event.getLocalPosition(self); var cellX = Math.floor(pos.x / cellGraphics.width); var cellY = Math.floor(pos.y / cellGraphics.height); board.revealCell(cellX, cellY); if (board.cells[cellX][cellY].isMine) { gameOver = true; LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } }); LK.on('tick', function () { if (gameOver) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } }); });
var Cell = Container.expand(function () {
var self = Container.call(this);
var cellGraphics = self.createAsset('cell', 'Cell Graphics', .5, .5);
self.isMine = false;
self.isRevealed = false;
self.neighborMines = 0;
self.reveal = function () {};
self.placeMine = function () {};
self.calculateNeighborMines = function () {};
});
var Board = Container.expand(function () {
var self = Container.call(this);
var boardGraphics = self.createAsset('board', 'Board Graphics', .5, .5);
self.cells = [];
self.generateBoard = function () {};
self.revealCell = function (x, y) {};
self.placeMines = function () {};
self.calculateAllNeighborMines = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
var board = self.addChild(new Board());
var gameOver = false;
board.generateBoard();
board.placeMines();
board.calculateAllNeighborMines();
self.on('down', function (obj) {
var pos = obj.event.getLocalPosition(self);
var cellX = Math.floor(pos.x / cellGraphics.width);
var cellY = Math.floor(pos.y / cellGraphics.height);
board.revealCell(cellX, cellY);
if (board.cells[cellX][cellY].isMine) {
gameOver = true;
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
});
LK.on('tick', function () {
if (gameOver) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
});
});
Sea mine. Minesweeper. Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Watery background. 10x10 Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single white square. Round corners. Vector. Simple details. Flat shaded. No shadows. No outlines.