===================================================================
--- original.js
+++ change.js
@@ -4,9 +4,9 @@
//<Assets used in the game will automatically appear here>
// PuzzlePiece class to represent each piece of the puzzle
var PuzzlePiece = Container.expand(function () {
var self = Container.call(this);
- self.assetId = 'piece' + (Math.floor(Math.random() * 20) + 1);
+ self.assetId = 'piece' + (Math.floor(Math.random() * 10) + 1);
var pieceGraphics = self.attachAsset(self.assetId, {
anchorX: 0.5,
anchorY: 0.5
});
@@ -88,9 +88,9 @@
return piece.destroy();
});
pieces = [];
// Create new pieces for the current level
- for (var i = 0; i < 20; i++) {
+ for (var i = 0; i < 10; i++) {
var piece = new PuzzlePiece();
piece.x = Math.random() * 2048;
piece.y = Math.random() * 2732;
piece.setCorrectPosition(100 + i * 150, 100 + i * 150);