Show FEN during game (for debug at least)
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 4 Dec 2018 22:25:07 +0000 (23:25 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 4 Dec 2018 22:25:07 +0000 (23:25 +0100)
public/javascripts/components/game.js
views/rules/Wildebeest.pug

index 72b5da9..1e8d9fd 100644 (file)
@@ -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() }
                                                        }
                                                )
                                        ]
index 482ab6b..8a14fb2 100644 (file)
@@ -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