previous

page 14

next
another go implementation
index.html
<div id='bottom'>
<div id='message'></div>
<div id='another' onClick='setup();'>another go</div>
</div>
styles.css
...
#pane1, #pane3, #bottom {
flex-direction:column;
...
#another {
margin-top:2vmin;
padding:1vmin 2vmin;
background-color:blue;
color:white;
}

So all that remains is keeping count of the wins.
Obviously we'll need two globals, both initially set to zero.

var g_computer_count=0;
var g_player_count=0;
previous
next