User prompt
reduce the alpha of lines
Code edit (1 edits merged)
Please save this source code
User prompt
add horizontal and vertical lines between dots
User prompt
add an asset for lines between dots
Code edit (2 edits merged)
Please save this source code
User prompt
add two icons that will represent the 2 players on the top
Code edit (1 edits merged)
Please save this source code
User prompt
add more space between dots
User prompt
center the board in the screen
User prompt
the board should be 7x7
Initial prompt
Xmas Dots and Boxes
var Dot = Container.expand(function () { var self = Container.call(this); var dotGraphics = self.createAsset('dot', 'Dot Graphics', .5, .5); self.connect = function () {}; }); var Square = Container.expand(function () { var self = Container.call(this); var squareGraphics = self.createAsset('square', 'Square Graphics', .5, .5); self.collectGift = function () {}; }); var Game = Container.expand(function () { var self = Container.call(this); var dots = []; var squares = []; var gifts = 0; var boardSize = 6 * 300; var offsetX = (2048 - boardSize) / 2; var offsetY = (2732 - boardSize) / 2; for (var i = 0; i < 7; i++) { for (var j = 0; j < 7; j++) { var dot = new Dot(); dot.x = offsetX + i * 300; dot.y = offsetY + j * 300; dots.push(dot); self.addChild(dot); } } dots.forEach(function (dot) { dot.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); }); }); LK.on('tick', function () { squares.forEach(function (square) { if (square.isComplete()) { gifts++; square.collectGift(); } }); }); });
===================================================================
--- original.js
+++ change.js
@@ -12,16 +12,16 @@
var self = Container.call(this);
var dots = [];
var squares = [];
var gifts = 0;
- var boardSize = 6 * 200;
+ var boardSize = 6 * 300;
var offsetX = (2048 - boardSize) / 2;
var offsetY = (2732 - boardSize) / 2;
for (var i = 0; i < 7; i++) {
for (var j = 0; j < 7; j++) {
var dot = new Dot();
- dot.x = offsetX + i * 200;
- dot.y = offsetY + j * 200;
+ dot.x = offsetX + i * 300;
+ dot.y = offsetY + j * 300;
dots.push(dot);
self.addChild(dot);
}
}
a b&w grinch icon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
b&w smiling Santa Clauss' head icon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white christmas star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
top face of a white gift. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.