add move by arrows, add space for preview toggle

This commit is contained in:
Zutatensuppe 2021-04-19 23:59:14 +02:00
parent be6fc7a3a3
commit f5a93f1f57
3 changed files with 101 additions and 11 deletions

View file

@ -438,11 +438,11 @@ function handleInput(gameId, playerId, input, ts) {
let changes = []
const _dataChange = () => {
changes.push(['data', puzzle.data])
changes.push([Protocol.CHANGE_DATA, puzzle.data])
}
const _tileChange = (tileIdx) => {
changes.push(['tile', getTile(gameId, tileIdx)])
changes.push([Protocol.CHANGE_TILE, getTile(gameId, tileIdx)])
}
const _tileChanges = (tileIdxs) => {
@ -452,7 +452,7 @@ function handleInput(gameId, playerId, input, ts) {
}
const _playerChange = () => {
changes.push(['player', Util.encodePlayer(getPlayer(gameId, playerId))])
changes.push([Protocol.CHANGE_PLAYER, Util.encodePlayer(getPlayer(gameId, playerId))])
}
// put both tiles (and their grouped tiles) in the same group