added score

This commit is contained in:
sm
2013-04-23 23:27:30 -07:00
parent 37ae2cf663
commit dc24ed7e4a
4 changed files with 19 additions and 7 deletions
+3 -2
View File
@@ -1,12 +1,13 @@
function update_board(f, o, s) {
function update_board(f, o, s, score) {
$("#first").text(f);
$("#operation").text(o);
$("#second").text(s);
$("#score").text(score);
}
function new_problem() {
$.get("/api/v0/problem/", function(d) {
update_board(d["first"], d["operation"], d["second"]);
update_board(d["first"], d["operation"], d["second"], d["score"]);
$("#answer").val("");
})
}