previous

page 30

next
what next?

What a marathon and well done for sticking the distance.
But there's still heaps more we can do to make our FreeCell as close to perfect for our players as possible.

Let's start by offering a redeal button for when they want to abandon the current game. deal() will do most of the work for us but we also need to make sure that there is no highlight active and that we deal with any globals that need initialising. This is where you see the advantage of having them all in the one place!

So first let's add a button like this which will lead to a redeal() function.

I have used almost the same setup as we used in Project 8.

styles.css
.button {
margin-top:1vmin;
padding:.5vmin 1vmin;
background-color:blue;
color:white;
font-size:2vmin;
}
index.html
<div id='temp_panel'>
<div class='button' onClick='redeal();'>redeal</div>
<script>setup_temp();</script>
</div>
previous
next