previous

page 24

next
globals.js
var g_main_cols=[];
var g_z=50;
var g_click_card=-1;
var g_seq=[];
var g_temp_col=[];
var g_final_col=[];
deal() in functions.js
function deal() {
var cards=[];
for (var i=1;i<52;i++) {
if (i!=13 && i!=26 && i!=39) cards.push(i);
}
for (var c=1;c<9;c++) g_main_cols[c]=[];
Shuffle(cards);
var i=0;
for (var c=1;c<9;c++) {
for (var r=1;r<7;r++) {
var id=cards[i]; i++;
g_main_cols[c].push(id);
}
}
g_temp_col=[-1,-1,-1,-1];
g_final_col=[0,13,26,39];
}
draw() in functions.js
function draw() {
...
// final
for (var i=0;i<4;i++) {
var el=document.getElementById(200+i);
var j=g_final_col[i];
el.src='cards/'+j+'.png';
}
}

that's the last of the six!

previous
next