X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=61c67dece3d7555b76d4c1ddb1cfdb7e5e630ac2;hb=1b56b73614509d1dca8c4353f18fb78349940cf8;hp=8e88b05540cb29e847617449b77b962d471e56ee;hpb=42a9284896b9cf9a579d32b7cf77dfc1f5786472;p=vchess.git diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 8e88b055..61c67dec 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -11,28 +11,36 @@ div#baseGame #gameContainer #boardContainer Board( + ref="board" :vr="vr" :last-move="lastMove" - :analyze="game.mode=='analyze'" + :analyze="mode=='analyze'" :score="game.score" :user-color="game.mycolor" :orientation="orientation" :vname="game.vname" :incheck="incheck" @play-move="play" + @click-square="clickSquare" ) #turnIndicator(v-if="showTurn") {{ turn }} - #controls + #controls.button-group button(@click="gotoBegin()") img.inline(src="/images/icons/fast-forward_rev.svg") button(@click="undo()") img.inline(src="/images/icons/play_rev.svg") button(v-if="canFlip" @click="flip()") img.inline(src="/images/icons/flip.svg") + button( + @click="runAutoplay()" + :class="{'in-autoplay': autoplay}" + ) + img.inline(src="/images/icons/autoplay.svg") button(@click="play()") img.inline(src="/images/icons/play.svg") button(@click="gotoEnd()") img.inline(src="/images/icons/fast-forward.svg") + p#fenAnalyze(v-show="showFen") {{ (!!vr ? vr.getFen() : "") }} #movesList MoveList( :show="showMoves" @@ -43,10 +51,12 @@ div#baseGame :firstNum="firstMoveNumber" :moves="moves" :cursor="cursor" + :vname="game.vname" @download="download" @showrules="showRules" - @analyze="analyzePosition" + @analyze="toggleAnalyze" @goto-move="gotoMove" + @redraw-board="redrawBoard" ) .clearer @@ -54,6 +64,7 @@ div#baseGame