import { Card } from '../common/Card';
import * as global from './munchkin.js';
import { Player } from '../common/Player';
import { load, create_lower, create_info, create_cards, create_buttons } from './load.js';

export function over(obj)
{
    obj.width *= 2;
    obj.height *= 2;
    obj.y = global.game.height - obj.height / 2;
    for (var i = obj.iter + 1; i < global.player.hand.length; i++) 
        global.cards[i].sendToBack();
    global.down_lower.sendToBack();
    for (var i = 0; i <= obj.iter; i++) 
        global.cards[i].bringToTop();
}
export function out(obj)
{
    obj.width /= 2;
    obj.height /= 2;
    obj.y = global.game.height - obj.height / 2;
}
export function down(obj)
{
    var oo = Card.byId(obj.key.substr(6));  
    if (oo.canBeWielded(global.player, global.table)){
        global.player.wield(obj.key.substr(6), global.table);
        console.log(global.player);
        global.cards[i].splise();
        global.player.hand[];
        global.cards[global.player.hand.length - 1] = undefined;
        create_crads();
    }
}
@@ -18,22 +18,21 @@
 rom '../
-common
+logic
 /Card';%0A
@@ -42,67 +42,69 @@
 ort 
-* as global from './munchkin.js';%0Aimport %7B Player %7D
+%7B Player %7D from '../logic/Player';%0Aimport * as global
  from '.
 ./co
@@ -103,23 +103,20 @@
 m '.
-./common/Player
+/munchkin.js
 ';%0Ai
@@ -953,17 +953,27 @@
 er.hand%5B
-%5D
+i%5D.splise()
 ;%0A      

fix events.js