previous

page 28

next
check_second(card) in functions.js
function check_second(card) {
var ok;
if (empty(card)) {
ok=true;
if (klass(card)=='temp' && g_seq.length>1) {
ok=false;
}
} else {
if (klass(card)=='temp') {
ok=false;
} else if (klass(card)=='final') {
if (g_seq.length>1) {
ok=false;
} else {
var i=card.id-200;
var v0=g_final_col[i];
var v1=first_card_value();
ok=false;
if ((v0+1)==v1) ok=true;
}
} else { // must be main
if (last(card)) { // check for sequence
// convert strings to numbers
var n1=parseInt(card.id);
var n2=first_card_value();
var arr=[n1,n2];
ok=check_sequence(arr);
} else { // is not last in column
ok=false;
}
}
}
return ok;
}

more →

previous
next