Number game algorithm
<p>I am doing some research at the moment into creating a new maths game for primary school children where divs from 0-9 appear at random inside a container. </p>

<p>A question is given at the beginning. Something like, multiples of 20. The user will then have to click on the correct ones, and they will then be counted at the end and a score will be given.</p>

<p>So at the moment I have the basic structure, divs pop up and you click them and it adds to the correct answer, meaning there is no wrong answer at this point in time.</p>

<p>I want to know what the best way of determining the right and wrong answers is. Is there and algorithm that I can use that will work out whether the answers are right or wrong, and how would I link it to the divs?</p>

<pre><code>&lt;div id="container"&gt;
    &lt;div id="char1" class="character right1" vaule="1"&gt;&lt;/div&gt;
    &lt;div id="char2" class="character right2" vaule="2"&gt;&lt;/div&gt;
    &lt;div id="char3" class="character right3" vaule="3"&gt;&lt;/div&gt;
    &lt;div id="char4" class="character right4" vaule="4"&gt;&lt;/div&gt;
    &lt;div id="char5" class="character right5" vaule="5"&gt;&lt;/div&gt;
    &lt;div id="char6" class="character right6" vaule="6"&gt;&lt;/div&gt;
    &lt;div id="char7" class="character right7" vaule="7"&gt;&lt;/div&gt;
    &lt;div id="char8" class="character right8" vaule="8"&gt;&lt;/div&gt;
    &lt;div id="char9" class="character right9" vaule="9"&gt;&lt;/div&gt;
    &lt;div id="char9" class="character right0" vaule="0"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>wrong answers will be given the class ".wrong" as apposed to ".right"</p>

<p>Fiddle: <a href="http://jsfiddle.net/SKB3Q/10/" rel="nofollow">http://jsfiddle.net/SKB3Q/10/</a></p>
