- added function to get random number and card

This commit is contained in:
2021-06-08 15:58:32 +02:00
parent 98177f6b5b
commit 948529818b
3 changed files with 119 additions and 22 deletions

View File

@@ -1,22 +1,9 @@
const app = new PIXI.Application({
autoResize: true,
resolution: devicePixelRatio,
backgroundColor: 0x0073db
});
document.getElementById('game').appendChild(app.view);
function start_game() {
socket.on('dice', function (data) {
console.log(data);
});
// -------------------------------------- code --------------------------------------
// ------------------------------------ end code ------------------------------------
// Resize (Do Not modify)
window.addEventListener('resize', resize);
function resize() {
let game = document.getElementById('game');
app.renderer.resize(game.offsetWidth, game.offsetHeight);
}
resize();
socket.on('card', function (data) {
console.log(data);
});
}