4 * Copyright (C) 2006-2012 Matteo Nastasi
5 * mailto: nastasi@alternativeoutput.it
6 * matteo.nastasi@milug.org
7 * web: http://www.alternativeoutput.it
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. You should have received a
18 * copy of the GNU General Public License along with this program; if
19 * not, write to the Free Software Foundation, Inc, 59 Temple Place -
20 * Suite 330, Boston, MA 02111-1307, USA.
23 /* number of players */
25 /* initial number of cards in hand */
32 var is_my_time = false;
33 /* number of takes cards */
50 var cards_width = 55 + 2;
51 var cards_width_d2 = 27;
53 /* height of images */
54 var cards_height = 101 + 2;
55 var cards_height_d2 = 51;
59 var cards_width = 75 + 2;
60 var cards_width_d2 = 37;
62 /* height of images */
63 var cards_height = 121 + 2;
64 var cards_height_d2 = 61;
66 /* width of hands area */
67 var hands_width = 400;
69 /* width of the border */
70 var border_width = 10;
72 /* time to send a card to the player 10 or 250 */
73 var G_send_time = 250;
74 var G_play_time = 500;
75 var G_take_time = 500;
77 /* suffix to add to images name */
78 var sux = new Array( "", "_ea", "", "", "_we");
80 var cards_pos = new Array (CARD_HAND);
81 var cards_ea_pos = new Array (CARD_HAND);
82 var cards_ne_pos = new Array (CARD_HAND);
83 var cards_nw_pos = new Array (CARD_HAND);
84 var cards_we_pos = new Array (CARD_HAND);
86 var take_x = new Array(562, 745, 452, 30, 52);
87 var take_y = new Array(545, 177, 70, 62,155);
89 for (i = 0 ; i < CARD_HAND ; i++) {
96 function $(id) { return document.getElementById(id); }
98 function cards_dispose_so(car_n, tak_n)
102 $("takes").style.left = 200 + 400 - 90 + ((90 - cards_width) / 2);
103 $("takes").style.top = 475 + (125 - cards_height)/2;
104 $("takes").style.zIndex = 1;
105 $("takes").style.visibility = "visible";
111 disp = 400 - delta - (2 * border_width);
113 inter = parseInt((disp - cards_width) / (car_n - 1));
114 if (inter > cards_width)
119 wcard = cards_width + inter * (car_n - 1);
120 start = 200 + border_width + (400 - border_width - border_width - wcard - delta) / 2;
122 for (i = 0 ; i < car_n ; i++) {
123 $("card" + cards_pos[i]).style.left = start + (i * inter);
124 $("card" + cards_pos[i]).style.top = 475 + (125 - cards_height)/2;
125 $("card" + cards_pos[i]).style.zIndex = CARD_HAND - i;
126 $("card" + cards_pos[i]).style.visibility = "visible";
135 function cards_dispose_ne(car_n, tak_n) {
140 $("takes_ne").style.left = 800 - cards_width - 400 + 90 - ((90 - cards_width) / 2);
141 $("takes_ne").style.top = (125 - cards_height)/2;
142 $("takes_ne").style.zIndex = 1;
143 $("takes_ne").style.visibility = "visible";
149 disp = 400 - delta - (2 * border_width);
151 inter = parseInt((disp - cards_width) / (car_n - 1));
152 if (inter > cards_width)
157 wcard = cards_width + inter * (car_n - 1);
158 start = 800 - cards_width - border_width - (400 - border_width - border_width - wcard - delta) / 2;
161 for (i = 0 ; i < car_n ; i++) {
162 $("card_ne" + cards_ne_pos[i]).style.left = start - ((car_n - i -1) * inter);
163 $("card_ne" + cards_ne_pos[i]).style.top = (125 - cards_height)/2;
164 $("card_ne" + cards_ne_pos[i]).style.zIndex = 8-i;
165 $("card_ne" + cards_ne_pos[i]).style.visibility = "visible";
174 function cards_dispose_nw(car_n, tak_n) {
179 $("takes_nw").style.left = 400 - cards_width - 400 + 90 - ((90 - cards_width) / 2);
180 $("takes_nw").style.top = (125 - cards_height)/2;
181 $("takes_nw").style.zIndex = 1;
182 $("takes_nw").style.visibility = "visible";
188 disp = 400 - delta - (2 * border_width);
190 inter = parseInt((disp - cards_width) / (car_n - 1));
191 if (inter > cards_width)
196 wcard = cards_width + inter * (car_n - 1);
197 // start = 0 + delta + border_width + (400 - border_width - border_width - wcard - delta) / 2;
198 start = 400 - cards_width - border_width - (400 - border_width - border_width - wcard - delta) / 2;
201 for (i = 0 ; i < car_n ; i++) {
202 $("card_nw" + cards_nw_pos[i]).style.left = start - ((car_n-i-1) * inter);
203 $("card_nw" + cards_nw_pos[i]).style.top = (125 - cards_height)/2;
204 $("card_nw" + cards_nw_pos[i]).style.zIndex = (8-i);
205 $("card_nw" + cards_nw_pos[i]).style.visibility = "visible";
206 // alert("xx "+start + (i * inter)+" yy " + (125 - cards_height)/2);
215 function cards_dispose_ea(car_n, tak_n) {
218 $("takes_ea").style.left = 675 + (125 - cards_height)/2;
219 $("takes_ea").style.top = 125 + ((90 - cards_width) / 2);
220 $("takes_ea").style.zIndex = 1;
221 $("takes_ea").style.visibility = "visible";
226 disp = 400 - delta - (2 * border_width);
228 inter = parseInt((disp - cards_width) / (car_n - 1));
229 if (inter > cards_width)
234 wcard = cards_width + inter * (car_n - 1);
235 start = 125 + delta + border_width + (400 - border_width - border_width - wcard - delta) / 2;
238 // console.log(car_n);
239 for (i = 0 ; i < car_n ; i++) {
240 $("card_ea" + cards_ea_pos[i]).style.left = 675 + (125 - cards_height)/2;
241 $("card_ea" + cards_ea_pos[i]).style.top = start + (i * inter);
242 $("card_ea" + cards_ea_pos[i]).style.zIndex = CARD_HAND - i;
243 $("card_ea" + cards_ea_pos[i]).style.visibility = "visible";
244 // alert("xx "+ (675 + (125 - cards_height)/2) +" yy " + start + (i * inter));
253 function cards_dispose_we(car_n, tak_n)
257 $("takes_we").style.left = (125 - cards_height)/2;
258 // $("takes_we").style.top = 125 + 400 - 90 + ((90 - cards_width) / 2);
259 $("takes_we").style.top = 525 - cards_width - 400 + 90 - ((90 - cards_width) / 2);
260 $("takes_we").style.zIndex = 1;
261 $("takes_we").style.visibility = "visible";
266 /* pixel a disposizione per mettere le carte: 400 - delta - 2 bordi */
267 disp = 400 - delta - (2 * border_width);
268 /* se c'e' piu' di una carta calcola di quanti pixel devono rimanere scoperte le carte dopo la prima */
270 inter = parseInt((disp - cards_width) / (car_n - 1));
271 if (inter > cards_width)
277 /* dopo avere fatto tutti i conti ricalcola quanti pixel effettivamente verranno occupati dalle carte */
278 wcard = cards_width + inter * (car_n - 1);
280 /* calcola il punto d'inizio da dove disporre le carte: DELTAY + lo spessore del bordo + la meta' di quello
281 che resta della larghezza totale meno tutti gli altri ingombri */
282 // start = 125 + border_width + (400 - border_width - border_width - wcard - delta) / 2;
283 start = 525 - cards_width - border_width - (400 - border_width - border_width - wcard - delta) / 2;
285 for (i = 0 ; i < car_n ; i++) {
286 $("card_we" + cards_we_pos[i]).style.left = (125 - cards_height)/2;
287 $("card_we" + cards_we_pos[i]).style.top = start - (i * inter);
288 $("card_we" + cards_we_pos[i]).style.zIndex = CARD_HAND - i;
289 $("card_we" + cards_we_pos[i]).style.visibility = "visible";
298 var cards_dispose_arr = new Array(cards_dispose_so, cards_dispose_ea,
299 cards_dispose_ne, cards_dispose_nw,
302 function cards_dispose(player_pos, cards, takes)
304 var idx = (player_pos - table_pos + PLAYERS_N) % PLAYERS_N;
306 return (cards_dispose_arr[idx](cards,takes));
312 function card_mouseup_cb(o) {
313 var idx = o.id.substring(4);
314 var briskid = o.briskid;
320 /* case swap in the group */
323 if (parseInt(o.style.top) > 475 &&
324 parseInt(o.style.left) >= 200 && parseInt(o.style.left) < 600) {
325 /* Rearrange cards */
327 // $("sandbox3").innerHTML = "REARRANGE: "+idx;
334 /* found the associated index of the current card. */
335 for (i = 0 ; i < cards_n ; i++)
336 if (cards_pos[i] == idx)
340 disp = 400 - delta - (2 * border_width);
342 inter = parseInt((disp - cards_width) / (cards_n - 1));
343 if (inter > cards_width)
348 wcard = cards_width + inter * (cards_n - 1);
349 start = 200 + border_width + (400 - border_width - border_width - wcard - delta) / 2;
351 for (i = 0 ; i < cards_n ; i++) {
352 /* $("sandbox").innerHTML = */
353 // alert( "LEFT: " + o.style.left + "VALUE " + (cards_width + start + (i * (cards_width / 2))));
354 // $("sandbox3").innerHTML += "<br>LEFT: "+parseInt(o.style.left)+" START["+i+"]: "+(start + ((i+1) * inter));
356 tst = (parseInt(o.style.left) < start + ((i+1) * inter));
358 tst = (parseInt(o.style.left) > start + (i * inter));
360 // $("sandbox2").innerHTML = "old: " +old_idx+ " i: " +i+ "left: " + parseInt(o.style.left) + "comp: " + (start + (cards_width / 2) + (i * (cards_width / 2)));
366 for (e = old_idx ; e < i ; e++)
367 cards_pos[e] = cards_pos[e+1];
371 for (e = old_idx ; e > i ; e--)
372 cards_pos[e] = cards_pos[e-1];
379 cards_dispose_so(cards_n,takes_n);
383 else if (is_my_time &&
384 parseInt(o.style.top) >= 250 &&
385 parseInt(o.style.top) + cards_height < 450 &&
386 parseInt(o.style.left) >= 300 &&
387 (parseInt(o.style.left) + cards_width) < 500) {
390 $("sandbox2").innerHTML = "PLAYED";
392 for (i = 0 ; i < cards_n ; i++) {
393 if (cards_pos[i] == idx) {
394 /* $("sandbox").innerHTML = "Pippo: "+ i; */
395 for (e = i ; e < cards_n-1 ; e++) {
396 cards_pos[e] = cards_pos[e+1];
398 cards_pos[cards_n-1] = idx;
400 cards_dispose_so(cards_n, takes_n);
403 act_play(briskid,o.style.left,o.style.top);
407 cards_dispose_so(cards_n, takes_n);
412 $("sandbox2").innerHTML = "TO ORIGINAL";
413 /* alert("out card " + parseInt(o.style.top)); */
414 /* return to the original position */
415 cards_dispose_so(cards_n, takes_n);
422 function card_send_so(id,card,free,ct)
424 var img = $("card"+id);
425 img.src = getcard(-1,0);
428 img.style.left = 400 - cards_width_d2;
429 img.style.top = 300 - cards_height_d2;
430 img.style.zIndex = 100;
432 var movimg = new slowimg(img,400 - cards_width / 2,475 + (125 - cards_height)/2,25,free,"cards_dispose_so("+ct+", 0)",getcard(card,0));
433 movimg.settime(G_send_time);
437 function card_send_ea(id,card,free,ct)
439 var img = $("card_ea"+id);
440 img.src = getcard(card,1);
443 img.style.left = 400 - cards_height_d2;
444 img.style.top = 300 - cards_width_d2;
445 img.style.zIndex = 100;
447 var movimg = new slowimg(img,686,296,25,free,"cards_dispose_ea("+ct+", 0);",getcard(card,1));
448 movimg.settime(G_send_time);
452 function card_send_ne(id,card,free,ct)
454 var img = $("card_ne"+id);
455 img.src = getcard(card,2);
458 img.style.left = 400 - cards_width_d2;
459 img.style.top = 300 - cards_height_d2;
460 img.style.zIndex = 100;
462 var movimg = new slowimg(img,571,11,25,free,"cards_dispose_ne("+ct+", 0);",getcard(card,2));
463 movimg.settime(G_send_time);
467 function card_send_nw(id,card,free,ct)
469 var img = $("card_nw"+id);
470 img.src = getcard(card,3);
473 img.style.left = 400 - cards_width_d2;
474 img.style.top = 300 - cards_height_d2;
475 img.style.zIndex = 100;
477 var movimg = new slowimg(img,171,11,25,free,"cards_dispose_nw("+ct+", 0);",getcard(card,3));
478 movimg.settime(G_send_time);
482 function card_send_we(id,card,free,ct)
484 var img = $("card_we"+id);
485 img.src = getcard(card,4);
488 if (id < 0 || id > 39)
489 alert("ID ERRATO"+id);
491 img.style.left = 400 - cards_height_d2;
492 img.style.top = 300 - cards_width_d2;
493 img.style.zIndex = 100;
494 var movimg = new slowimg(img,11,296,25,free,"cards_dispose_we("+ct+", 0);",getcard(card,4));
495 movimg.settime(G_send_time);
499 var card_send_arr = new Array(card_send_so, card_send_ea,
500 card_send_ne, card_send_nw,
503 function card_send(player_pos,id,card,free,ct)
505 var idx = (player_pos - table_pos + PLAYERS_N) % PLAYERS_N;
507 card_send_arr[idx](id,card,free,ct);
510 function getcard(card,pos_id)
513 return ("img/cover"+sux[pos_id]+".png");
515 return ("img/0"+card+sux[pos_id]+".png");
517 return ("img/"+card+sux[pos_id]+".png");
520 function card_setours(zer,uno,due,tre,qua,cin,sei,set)
523 var arg = new Array(zer,uno,due,tre,qua,cin,sei,set);
525 for (i = 0 ; i < CARD_HAND ; i++) {
526 var id = (arg[i] < 10 ? '0' + arg[i] : '' + arg[i]);
527 $("card"+i).setAttribute('data-card-id', id);
528 $("card"+i).briskid = arg[i];
534 function card_play_so(card_idx, x, y)
536 alert("card_play_so: unreachable function.");
540 function card_postplay_ea(card_pos)
542 var img = $("card_ea"+card_pos);
545 for (i = 0 ; i < cards_ea_n ; i++) {
546 if (cards_ea_pos[i] == card_pos) {
547 for (e = i ; e < cards_ea_n-1 ; e++) {
548 cards_ea_pos[e] = cards_ea_pos[e+1];
550 cards_ea_pos[cards_ea_n-1] = card_pos;
552 cards_dispose_ea(cards_ea_n, takes_ea_n);
558 function card_play_ea(card_idx, x, y)
560 // var card_pos = RANGE 0 <= x < cards_ea_n
561 var card_pos = rnd_int(0,cards_ea_n-1);
562 var img = $("card_ea"+cards_ea_pos[card_pos]);
563 // alert("IMMO CON "+cards_ea_pos[card_pos]);
564 var newname = getcard(card_idx,1);
567 x1 = 500 + ((y-250) * (125 - cards_height) / (200 - cards_height));
568 y1 = 450 - cards_width - (x - 300);
570 var movimg = new slowimg(img, x1, y1, 25, 1, "card_postplay_ea("+cards_ea_pos[card_pos]+");", newname);
571 movimg.settime(G_play_time);
576 function card_postplay_ne(obj,card_pos)
578 var img = $("card_ne"+card_pos);
582 for (i = 0 ; i < cards_ne_n ; i++) {
583 if (cards_ne_pos[i] == card_pos) {
584 for (e = i ; e < cards_ne_n-1 ; e++) {
585 cards_ne_pos[e] = cards_ne_pos[e+1];
587 cards_ne_pos[cards_ne_n-1] = card_pos;
589 cards_dispose_ne(cards_ne_n, takes_ne_n);
595 function card_play_ne(card_idx, x, y)
597 var card_pos = rnd_int(0,cards_ne_n-1);
598 var img = $("card_ne"+cards_ne_pos[card_pos]);
599 var newname = getcard(card_idx,2);
602 x1 = 600 - cards_width - (x - 300);
603 y1 = 250 - cards_height - ((y-250) * (125 - cards_height) / (200 - cards_height));
605 var movimg = new slowimg(img, x1, y1, 25, 1, "card_postplay_ne(this,"+cards_ne_pos[card_pos]+");", newname);
606 movimg.settime(G_play_time);
611 function card_postplay_nw(card_pos)
613 var img = $("card_nw"+card_pos);
616 for (i = 0 ; i < cards_nw_n ; i++) {
617 if (cards_nw_pos[i] == card_pos) {
618 for (e = i ; e < cards_nw_n-1 ; e++) {
619 cards_nw_pos[e] = cards_nw_pos[e+1];
621 cards_nw_pos[cards_nw_n-1] = card_pos;
623 cards_dispose_nw(cards_nw_n, takes_nw_n);
629 function card_play_nw(card_idx, x, y)
631 var card_pos = rnd_int(0,cards_nw_n-1);
632 var img = $("card_nw"+cards_nw_pos[card_pos]);
633 var newname = getcard(card_idx,3);
636 x1 = 400 - cards_width - (x - 300);
637 y1 = 250 - cards_height - ((y-250) * (125 - cards_height) / (200 - cards_height));
639 var movimg = new slowimg(img, x1, y1, 25, 1, "card_postplay_nw("+cards_nw_pos[card_pos]+");", newname);
640 movimg.settime(G_play_time);
645 function card_postplay_we(card_pos)
647 var img = $("card_we"+card_pos);
650 for (i = 0 ; i < cards_we_n ; i++) {
651 if (cards_we_pos[i] == card_pos) {
652 for (e = i ; e < cards_we_n-1 ; e++) {
653 cards_we_pos[e] = cards_we_pos[e+1];
655 cards_we_pos[cards_we_n-1] = card_pos;
657 cards_dispose_we(cards_we_n, takes_we_n);
663 function card_play_we(card_idx, x, y)
665 var card_pos = rnd_int(0,cards_we_n-1);
666 var img = $("card_we"+cards_we_pos[card_pos]);
667 var newname = getcard(card_idx,4);
670 x1 = 300 - cards_height - ((y-250) * (125 - cards_height) / (200 - cards_height));
673 var movimg = new slowimg(img, x1, y1, 25, 1, "card_postplay_we("+cards_we_pos[card_pos]+");", newname);
674 movimg.settime(G_play_time);
678 var card_play_arr = new Array( card_play_so, card_play_ea, card_play_ne, card_play_nw, card_play_we);
680 /* card_play(player_pos, card_pos, card_idx, x, y)
681 player_pos - position of the player on the table
682 card_pos - position of the card in the hand of the player
683 card_idx - id of the card (to show it after the move)
684 x, y - coordinates of the card on the original table
686 orig 200x200 dest 200x125
688 function card_play(player_pos, card_idx, x, y)
690 var idx = (player_pos - table_pos + PLAYERS_N) % PLAYERS_N;
692 card_play_arr[idx](card_idx, x, y);
697 function card_place_so(card_pos, card_idx, x, y)
699 var img = $("card"+card_pos);
701 // alert("card_place_so"+card_pos);
705 img.style.visibility = "visible";
706 img.src = getcard(card_idx,0);
710 function card_place_ea(card_pos, card_idx, x, y)
712 var img = $("card_ea"+card_pos);
714 // alert("card_place_ea");
716 img.style.left = 500 + ((y-250) * (125 - cards_height) / (200 - cards_height));
717 img.style.top = 450 - cards_width - (x - 300);
718 img.style.visibility = "visible";
719 img.src = getcard(card_idx,1);
723 function card_place_ne(card_pos, card_idx, x, y)
725 var img = $("card_ne"+card_pos);
727 // alert("card_place_ne");
729 img.style.left = 600 - cards_width - (x - 300);
730 img.style.top = 250 - cards_height - ((y-250) * (125 - cards_height) / (200 - cards_height));
731 img.style.visibility = "visible";
732 img.src = getcard(card_idx,2);
736 function card_place_nw(card_pos, card_idx, x, y)
738 var img = $("card_nw"+card_pos);
740 // alert("card_place_nw");
742 img.style.left = 400 - cards_width - (x - 300);
743 img.style.top = 250 - cards_height - ((y-250) * (125 - cards_height) / (200 - cards_height));
744 img.style.visibility = "visible";
745 img.src = getcard(card_idx,3);
749 function card_place_we(card_pos, card_idx, x, y)
751 var img = $("card_we"+card_pos);
753 // alert("card_place_we");
755 img.style.left = 300 - cards_height - ((y-250) * (125 - cards_height) / (200 - cards_height));
756 img.style.top = 250 + x - 300;
757 img.style.visibility = "visible";
758 img.src = getcard(card_idx,4);
761 var card_place_arr = new Array( card_place_so, card_place_ea, card_place_ne, card_place_nw, card_place_we );
764 function card_place(player_pos, card_pos, card_idx, x, y)
766 var idx = (player_pos - table_pos + PLAYERS_N) % PLAYERS_N;
768 // alert("card_place"+idx);
770 card_place_arr[idx](card_pos, card_idx, x, y);
775 function card_post_take(card)
777 var img = $("card"+card);
778 img.style.visibility = "hidden";
779 cards_dispose_so(cards_n, takes_n);
782 function card_ea_post_take(card)
784 var img = $("card_ea"+card);
785 img.style.visibility = "hidden";
786 cards_dispose_ea(cards_ea_n, takes_ea_n);
789 function card_ne_post_take(card)
791 var img = $("card_ne"+card);
792 img.style.visibility = "hidden";
793 cards_dispose_ne(cards_ne_n, takes_ne_n);
796 function card_nw_post_take(card)
798 var img = $("card_nw"+card);
799 img.style.visibility = "hidden";
800 cards_dispose_nw(cards_nw_n, takes_nw_n);
803 function card_we_post_take(card)
805 var img = $("card_we"+card);
806 img.style.visibility = "hidden";
807 cards_dispose_we(cards_we_n, takes_we_n);
811 function cards_take(win)
813 var taker = (win - table_pos + PLAYERS_N) % PLAYERS_N;
815 // alert("cards_n: "+cards_n+"card: "+cards_pos[cards_n]+"cards_ea_n: "+cards_ea_n+"card_ea: "+cards_ea_pos[cards_ea_n]+"cards_ne_n: "+cards_ne_n+"card_ne: "+cards_ne_pos[cards_ne_n] + "taker:"+taker);
819 takes_n += PLAYERS_N; break;
821 takes_ea_n += PLAYERS_N; break;
823 takes_ne_n += PLAYERS_N; break;
825 takes_nw_n += PLAYERS_N; break;
827 takes_we_n += PLAYERS_N; break;
832 var img = $("card"+cards_pos[cards_n]);
833 var movimg = new slowimg(img,
834 take_x[taker] - cards_width_d2,
835 take_y[taker] - cards_height_d2,
836 25, 0, "card_post_take("+cards_pos[cards_n]+");", null);
837 movimg.settime(G_take_time);
840 var img = $("card_ea"+cards_ea_pos[cards_ea_n]);
841 var movimg = new slowimg(img,
842 take_x[taker] - cards_height_d2,
843 take_y[taker] - cards_width_d2,
844 25, 0, "card_ea_post_take("+cards_ea_pos[cards_ea_n]+");", null);
845 movimg.settime(G_take_time);
848 var img = $("card_ne"+cards_ne_pos[cards_ne_n]);
849 var movimg = new slowimg(img,
850 take_x[taker] - cards_width_d2,
851 take_y[taker] - cards_height_d2,
852 25, (PLAYERS_N == 3 ? 1 : 0), "card_ne_post_take("+cards_ne_pos[cards_ne_n]+");", null);
853 movimg.settime(G_take_time);
856 var img = $("card_nw"+cards_nw_pos[cards_nw_n]);
857 var movimg = new slowimg(img,
858 take_x[taker] - cards_width_d2,
859 take_y[taker] - cards_height_d2,
860 25, 0, "card_nw_post_take("+cards_nw_pos[cards_nw_n]+");", null);
861 movimg.settime(G_take_time);
864 var img = $("card_we"+cards_we_pos[cards_we_n]);
865 var movimg = new slowimg(img,
866 take_x[taker] - cards_height_d2,
867 take_y[taker] - cards_width_d2,
868 25, 1, "card_we_post_take("+cards_we_pos[cards_we_n]+");", null);
869 movimg.settime(G_take_time);