diff --git a/development/code/LogicAdapter.ts b/development/code/LogicAdapter.ts index 65acc77f..239f3b70 100644 --- a/development/code/LogicAdapter.ts +++ b/development/code/LogicAdapter.ts @@ -84,7 +84,6 @@ export function onFellOffTheBoardTriggered( boardId: string, ) { const squareId = getSquareIdByElement(draggedElement); - console.log('83'); if (!squareId) return; const draggedElementPosition = getPositionFromSquareId(squareId, boardId); @@ -200,7 +199,6 @@ export function endGame(){ export function changeShownInventory(player: Player) { if (switchShownInventory(player.color)) { player.inventory.items.forEach((item) => { - console.log(item); showItemOnInventory(item,player.color); }); } @@ -231,7 +229,6 @@ export function placeItemOnBoard(itemElement: HTMLElement, targetElement: HTMLEl const squarePosition = getPositionFromSquareId(squareId, currentOpenBoardId); - console.log(itemElement.id); const usedItem = getCurrentPlayerItemById(itemElement.id); if (!usedItem) return false; diff --git a/development/code/ui/Events.ts b/development/code/ui/Events.ts index c54671ff..ac17ae12 100644 --- a/development/code/ui/Events.ts +++ b/development/code/ui/Events.ts @@ -99,12 +99,12 @@ export function dragElement(element: HTMLElement) { elementYPosition, ) as Array; const droppedOnElement = droppedOnElements.filter(element => { - console.log(element); return (element.classList.contains('square') || element.classList.contains('item') || element.classList.contains('piece') ) && element !== draggedElement; })[0]; + if (draggedElement.classList.contains('item')) { if (!placeItemOnBoard(draggedElement, droppedOnElement)) { returnItemToInventory(draggedElement);