function can_go_on(stack, column) {
if (column.num == 14) { // can't put things on aces
return;
}
if (stack.num == column.num - 1 && stack.suitcolor != column.suitcolor) {
return true;
}
return false;
}
function fill_spots(card, dom_object, is_stack) {
if (card.num == 14) {
click_card(dom_object);
click_card($($("img[src*='new_open']")[0]));
}
console.log(card, dom_object);
if (card.num == 13 && $("img[src*='new_blank_card']").length > 0 && $("img[src*='new_blank_card']").parent().prop("tagName") == "A") {
if(dom_object.closest("div").find("img:first").att r("src").indexOf("pyramid") != -1 && is_stack == false) { // only if it's not the stack card
// make sure it's not the empty stack pile, and make sure it's not covering any cards
click_card(dom_object);
click_card($($("img[src*='new_blank_card']")[0]));
}
}
}
function ace_math(num) { // if number = 1 then number = 14
if (num == 1) {
return 14;
}
return num;
}
function ace_pile(card, dom_object) {
// find ace for each card
var find_ace = $("a[onclick*='base_']").find("img[src*='/" + ace_math(card.num - 1) + "_" + card.suit + "']");
if (find_ace.length != 0) {
click_card(dom_object);
click_card(find_ace);
}
}
function find_new_columns() {
var top_stacks = $("td").find("img.deckcards[name]:first");
It plays well but then it will get stuck, like trying to put a 5 on a 7 and it will do it over and over again non stop until I manually press pause on the script and move the card