Flip
What to do next
- Make a copy of everything in this folder that you can play with.
- Browse through the HTML file and the JavaScript file;
see if you can find the connections between the names of things
in the various places.
- You can base a different board game on this one,
with different rules, colors, shapes whatever.
The trick is to figure out how it works, and how to change it.
You don't need to understand everything - though reading
the tutorials and references will help.
- Here are some things you might try to change to get going :
- Can you change the colors ?
- Can you change the size of the board?
- Can you change which square is flipped when you click?
(hint: compare the "click" and "click2" functions)
- When you feel like you're stuck, you can
- work through an HTML or JavaScript tutorial, reference or
wikipedia article, from the Docs list.
- ask Jim for a hint.
- Essential pieces of all this :
- HTML tags : <tag> stuff </>, especially
- <a href=""> - anchor links to other pages or javascript
- <div> - div (division) chunks
- <img src="web_address" /> - embedded images
- Programming constructs, especially
- variables : (a=2, b="hi")
- conditionals : if (){ .... }
- loops : while (){ ... }
- objects : thing.do('stuff')
- putting it all together: HTML tags are JavaScript objects !