Skip to content
Snippets Groups Projects

Some changes

Merged Max Wehmeier requested to merge some-changes into custom-server
+ 1
3
@@ -15,7 +15,7 @@ export default class SkribblChat extends CustomElement {
constructor(client){
super();
this._oldDrawer = -1;
this._oldPlayerCount = -1;
this._oldPlayerCount = client.state.value.players.length;
/** @type {string[]} */
this._guesses = [];
this._guessListPosition = 0;
@@ -79,10 +79,8 @@ export default class SkribblChat extends CustomElement {
this._input.value = "";
} else if (e.key=="ArrowUp"&&this._guessListPosition>0){
this._input.value = this._guesses[--this._guessListPosition];
console.log("Index:" , this._guessListPosition);
} else if (e.key=="ArrowDown"&&this._guessListPosition<this._guesses.length){
this._input.value = this._guesses[++this._guessListPosition]||"";
console.log("Index:" , this._guessListPosition);
}
});
client.onGuess(guessData=>{