previous

page 17

next
adding the shapes

Now it's time to add the shapes for the player to click on.
I'll give you the CSS - see if you can create shapes.js.
Each shape should have an attribute v which is its number: 1 to 8 and an onClick attribute leading to the shape_clicked function like in my example:

<img src='images/right/7.png' class='shape' v='7' onClick='shape_clicked(this);'>
CSS for the shapes
#main {
display:flex;
}
#shapes {
display:flex;
flex-direction:column;
justify-content:space-around;
}
.shape {
width:7.2vmin;
height:7.2vmin;
border:1vmin ivory solid;
}
previous
next