From 85be503d5592d8f4d082fb8364b0882447ca7fa1 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 4 Dec 2018 23:25:07 +0100 Subject: [PATCH] Show FEN during game (for debug at least) --- public/javascripts/components/game.js | 21 ++++++++++++++++++--- views/rules/Wildebeest.pug | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 72b5da90..1e8d9fd2 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -413,9 +413,24 @@ Vue.component('my-game', { { attrs: { id: "pgn-game" }, on: { click: this.download }, - domProps: { - innerHTML: this.pgnTxt - } + domProps: { innerHTML: this.pgnTxt } + } + ) + ] + ) + ); + } + else if (this.mode != "idle") + { + // Show current FEN (at least for debug) + elementArray.push( + h('div', + { attrs: { id: "fen-div" } }, + [ + h('p', + { + attrs: { id: "fen-string" }, + domProps: { innerHTML: this.vr.getBaseFen() } } ) ] diff --git a/views/rules/Wildebeest.pug b/views/rules/Wildebeest.pug index 482ab6b5..8a14fb2f 100644 --- a/views/rules/Wildebeest.pug +++ b/views/rules/Wildebeest.pug @@ -40,7 +40,7 @@ p You can win by checkmating or stalemating the enemy king. p. Note: the castling rule is more restrictive than described in the original rules. - I have a feeling that the game is OK like that, but I may change this soon. + The game seems OK like that, but this may change soon enough. h3 Credits -- 2.44.0