- gameOver: function(score) {
- this.game.mode = "analyze";
- this.game.score = score; //until Vue3, this property change isn't seen
- //by child (and doesn't need to be)
+ resetChatColor: function() {
+ // TODO: this is called twice, once on opening an once on closing
+ document.getElementById("chatBtn").style.backgroundColor = "#e2e2e2";
+ },
+ finishSendChat: function(chat) {
+ // NOTE: anonymous chats in corr games are not stored on server (TODO?)
+ if (this.game.type == "corr" && this.st.user.id > 0)
+ GameStorage.update(this.gameRef.id, {chat: chat});
+ },
+ processChat: function() {
+ if (!document.getElementById("modalChat").checked)
+ document.getElementById("chatBtn").style.backgroundColor = "#c5fefe";
+ },
+ gameOver: function(score, scoreMsg) {
+ this.game.score = score;
+ this.game.scoreMsg = scoreMsg;