previous

page 9

next
my index.html
<html>
<head>
<title>Countries</title>
<link rel='stylesheet' href='styles.css'>
<script src='squares.js'></script>
</head>
<body>
<div id='game'>
<div id='map'>
</div>
<div id='keyboard'>
</div>
<div id='squares'>
<script>squares();</script>
</div>
</div>
</body>
</html>

Now to load the squares. I struggled to write load_squares.js but it's very satisfying to see it work.
I used the % operator to decide which type of column I was on.
I also made use of the Hide_class and Show functions in my library.

To test it I added this to the bottom of my index.html:

<script>
load_squares(g_sets[0]);
</script>
previous
next