added multiplication

This commit is contained in:
sm
2014-12-07 21:23:31 -08:00
parent 6349277217
commit 467cda77bf
7 changed files with 70 additions and 25 deletions
@@ -17,7 +17,7 @@
<footer>
score: <span id="score"></span>
</footer>
<script src="/jquery-2.0.0.min.js"></script>
<script src="/jquery.js"></script>
<script src="/math.js"></script>
</body>
</html>
+4
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -6,7 +6,8 @@ function update_board(f, o, s, score) {
}
function new_problem() {
$.get("/api/v0/problem/", function(d) {
var type = document.URL.split('/')[3];
$.get("/api/v0/"+type+"/problem/", function(d) {
update_board(d["First"], d["Operation"], d["Second"], d["Score"]);
$("#answer").val("");
})
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mardson's Math Game</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/math.css" rel="stylesheet" media="screen">
</head>
<body>
<section id="content">
<span class="number" id="first">0</span>
<span class="number" id="operation">+</span>
<span class="number" id="second">0</span>
<div>
<input id="answer" type="number" size="2" class="number" autofocus />
</div>
</section>
<footer>
score: <span id="score"></span>
</footer>
<script src="/jquery.js"></script>
<script src="/math.js"></script>
</body>
</html>