
previous

page 24
next
making red the last shape picked up
In globals.js change [10,7,0,9] to [10,7,0,0] and add the following line:
var g_count=0;
In clicks.js add the following to the shape_clicked function:
g_count++;
if (g_count==6) g_layout[8]=[10,7,0,9];
if (g_count==6) g_layout[8]=[10,7,0,9];
My original game had audio messages. That's beyond the scope of this tute so we'll use written messages instead.
First we'll need a place for the message to appear. The following works nicely.
Add this in the game section of your index.html:
<div id='message' class='item'></div>
And this to your styles.css file:
#message {
grid-row: 2 / span 9;
grid-column: 1 / span 10;
background-color: lightblue;
align-self:center;
justify-self:center;
padding:2vmin;
font-size:3vmin;
}
grid-row: 2 / span 9;
grid-column: 1 / span 10;
background-color: lightblue;
align-self:center;
justify-self:center;
padding:2vmin;
font-size:3vmin;
}
previous
next