User prompt
Remove console log statements
User prompt
When setting color, also calculate a new background color for the game with v being 1/3 of that of the plate
User prompt
in update color use the HSV method such that the plates have 32 colors in total representing the full rainbow
User prompt
Add a HSV color generator method to the Plate class
User prompt
Update the colors array to be a perfect hue shifted rainbow with 32 pre calculated colors that represents the full rainbow
User prompt
Update the colors array to be a perfect hue shifted rainbow with 32 pre calculated colors
User prompt
Update the colors array to be a perfect hue shifted rainbow with 32 colors
User prompt
Update the colors array to have 32 colors that are a perfect pastel rainbow
User prompt
Update the colors array to have 32 colors of the rainbow
User prompt
Move the colors array outside the updateColors method
User prompt
Set rotation speed of overhang plate based on the direction
User prompt
Also add rotation speed to overhang plate
User prompt
When setting score text subtract 2 from the score rather than 1
User prompt
Set score to how many plates have been successfully stacked
User prompt
Add a score text at the top center of the screen
User prompt
Add a score to the top center of the screen, increment the score for each plate successfully stacked
User prompt
In tick if the current plate exits on the left, call game over
User prompt
If plates exists on the left of the screen call gameover
User prompt
If stacking a plate fails, calls gameover
User prompt
Attach overhang plates at zero z-index
User prompt
Also destroy overhang plates if they fly out of the screen at the bottom
User prompt
Add inertia to overhang plate move method
User prompt
Make the speed x variable of overhang plate 5 or -5
User prompt
Make initial y speed of overhang plates -20
User prompt
Make initial y speed of overhang plates -5
===================================================================
--- original.js
+++ change.js
@@ -105,9 +105,8 @@
if (newPlate.x < topPlate.x + topPlate.width && newPlate.x + newPlate.width > topPlate.x) {
var overhang = newPlate.x + newPlate.width / 2 - (topPlate.x + topPlate.width / 2);
var overhangSide = overhang > 0 ? 'right' : 'left';
overhang = Math.abs(overhang);
- console.log('Overhang:', overhang, 'Side:', overhangSide);
newPlate.stack();
currentPlateWidth -= overhang;
var overhangPlate = new OverhangPlate(overhang, overhangSide, newPlate.color);
overhangPlate.x = overhangSide === 'right' ? newPlate.x + newPlate.width / 2 : newPlate.x - newPlate.width / 2;