1 var cards = new Array ();
11 var img = "img#c" + n;
12 var width = $(img).width();
13 var height = $(img).height();
16 'left': (width >> 1) + "px",
17 'height': height + "px"}, 150);
19 $(img).queue (function(next) {
21 $(img).attr("src", "carte" + n + ".png");
23 $(img).attr("src", "dos.png");
29 'width': width + "px",
31 'height': height + "px"}, 150);
33 $(img).queue (function(next) {
34 cards[n] = 1 - cards[n];
35 $("div#d" + n).html(cards[n]);
39 if (cont !== undefined){
40 $(img).queue (function(next) {
47 function update_res() {
49 for(i = 4; i >= 0; i--){
50 acc = 2*acc + cards[i];
52 $("div#rescontent").html("= " + acc);
55 function set_to_int(n)
59 var tmp = new Array();
60 for (i = 0; i < 5; i++) {
64 $("div#rescontent").queue(function() {
68 for(i = 0; i < 5; i++) {
69 $("div#rescontent").queue(new Function("next", "if(" + tmp[i] + " != cards[" + i +"]) {flip(" + i + ");}; next();" ));
72 $("div#rescontent").queue(function (next) {
73 $("img").promise().done(function(){
79 $("div#rescontent").delay(1000);
82 function count(from, to){
84 for (i = from; i <= to; i++){
89 function hide_hints() {
90 $("div#all_digits").toggle();
91 $("div#result").toggle();