User prompt
Remove the strike and add a black drop shadow instead, also remove the , from the win tet
User prompt
Update the speed of move of tiles such that it takes a fixed amount of time to reach the target position
User prompt
when calling setPosition calculate speedX and speedY such that it takes a fixed amount of frames to reach the target position
User prompt
Make animation complete in 15 frames
User prompt
Don't add speedx and y before we have tested if the tile has reached it's target
User prompt
set win condition to 2048
User prompt
Create a rainbow of colors with 15 colors, and use them to tint the tile background based on the value of the tile
User prompt
Create a set tint method on tile
User prompt
Create a method that sets the tint of tileGraphics
User prompt
tint should also update when updateToRealValue is called, create a method that sets the tint color based on value rather than having this code twice
User prompt
when setting tint, remember that value is an exponential, normalize this to an index
User prompt
Update the color rainbow to be bright pastel colors
Code edit (2 edits merged)
Please save this source code
User prompt
also update tint when calling updateToRealValue, use a single method to set tint to prevent having this code twice
User prompt
call self.setTint rather than setting tint directly in updateToRealValue
User prompt
in set tint factor in that value is an exponential
User prompt
Make the tile colors a bright pastel rainbow with 32 colors in total
User prompt
Set tile text color to #332d28
User prompt
Don't add label to tileGraphics, add it directly to Tile
User prompt
Move up tile label by 30px
User prompt
Make new tiles have a random value of 2 or 4
User prompt
When a tole gets a new value it should become bigger then animate back to it's normal size
User prompt
Set anchor point of tileGraphics to .5,.5
User prompt
set anchor point of tileLabel to .5,.5
User prompt
when setting position of tile, add 250 to both x and y
===================================================================
--- original.js
+++ change.js
@@ -38,10 +38,10 @@
self.targetY = 0;
self.isMoving = false;
self.merged = false;
self.setPosition = function (x, y, instant) {
- self.targetX = x * 500;
- self.targetY = y * 500;
+ self.targetX = x * 500 + 250;
+ self.targetY = y * 500 + 250;
if (instant) {
self.x = self.targetX;
self.y = self.targetY;
}