why does it do this
This commit is contained in:
@@ -9,5 +9,6 @@ function computeTurn()
|
||||
|
||||
function initGame(boardstate, myplayer, players)
|
||||
{
|
||||
|
||||
addPiecesToDrawer();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,8 @@ function onGameBegin(socket, args)
|
||||
return;
|
||||
}
|
||||
|
||||
const boardstate = args.game.gamestates[args.game.gamestates.length];
|
||||
console.log(args);
|
||||
const boardstate = args.game.gamestates[args.game.gamestates.length-1];
|
||||
const myplayer = args.gameuser;
|
||||
const players = args.game.players;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ Number.prototype.clamp = function(min, max) {
|
||||
};
|
||||
|
||||
|
||||
const Drawer = document.querySelector('#piece-drawer');
|
||||
|
||||
/*
|
||||
TILE OBJECT
|
||||
{
|
||||
@@ -29,7 +31,16 @@ let PiecesDrawer = [];
|
||||
// Returns array of tile IDs that were added
|
||||
function addPiecesToDrawer(pieces)
|
||||
{
|
||||
const piece = document.createElement('piece');
|
||||
piece.innerText = 'A';
|
||||
piece.classList.add('unselectable');
|
||||
piece.classList.add('unplayed-piece');
|
||||
const score = document.createElement('score');
|
||||
score.innerText = '2';
|
||||
piece.appendChild(score);
|
||||
Drawer.appendChild(piece);
|
||||
|
||||
setupPieces();
|
||||
}
|
||||
|
||||
// Removes regardless of vadility
|
||||
|
||||
Reference in New Issue
Block a user