|
|
|
@ -570,7 +570,7 @@ class Board{
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let itemKey = this.getItemKey(fromElement, positionFrom);
|
|
|
|
let itemKey = this.getItemKey(fromElement, positionFrom, fromPlayer);
|
|
|
|
console.log(itemKey);
|
|
|
|
console.log(itemKey);
|
|
|
|
console.log(positionFrom);
|
|
|
|
console.log(positionFrom);
|
|
|
|
|
|
|
|
|
|
|
|
@ -608,8 +608,8 @@ class Board{
|
|
|
|
this.drawBoard();
|
|
|
|
this.drawBoard();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getItemKey(boardElementId, listPositionId){
|
|
|
|
getItemKey(boardElementId, listPositionId, playerFrom){
|
|
|
|
let itemKey = this.getItems(boardElementId, null, null, listPositionId);
|
|
|
|
let itemKey = this.getItems(boardElementId, playerFrom, null, listPositionId);
|
|
|
|
if(itemKey.length < 1){
|
|
|
|
if(itemKey.length < 1){
|
|
|
|
alert('Could not find key');
|
|
|
|
alert('Could not find key');
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|