"pug-plain-loader": "^1.0.0",
"raw-loader": "^1.0.0",
"sass-loader": "^8.0.2",
+ "vue-loader": "^15.9.1",
"vue-template-compiler": "^2.6.11",
"worker-loader": "^2.0.0"
},
-http://soundbible.com/1531-Temple-Bell.html
+(Old sound) http://soundbible.com/1531-Temple-Bell.html
+(New sound) https://freesound.org/people/JustInvoke/sounds/446142/
-#$# git-fat fe8e69ecbc3943ec0f460f46d89268d9b09a8c95 186939
+#$# git-fat 02534398246b0616640ffb851d4c331ad3b39bd8 113247
:firstNum="firstMoveNumber"
:moves="moves"
:cursor="cursor"
+ :vname="game.vname"
@download="download"
@showrules="showRules"
@analyze="toggleAnalyze"
// NOTE: variants pages already have a "Rules" link on top
span#rulesBtn(
v-if="!$route.path.match('/variants/')"
- @click="$emit('showrules')"
+ @click="clickRulesBtn()"
+ :class="btnRulesClass"
)
| {{ st.tr["Rules"] }}
button(
name: "my-move-list",
props: [
"moves", "show", "canAnalyze", "canDownload",
- "cursor", "score", "message", "firstNum"],
+ "vname", "cursor", "score", "message", "firstNum"],
data: function() {
return {
st: store.state
computed: {
evenNumbers: function() {
return [...Array(this.moves.length).keys()].filter(i => i%2==0);
+ },
+ btnRulesClass: function() {
+ // "rr" for "rules read"
+ return { highlightRules: !localStorage.getItem("rr_" + this.vname) };
}
},
methods: {
btnTooltipClass: function() {
return { tooltip: !("ontouchstart" in window) };
},
+ clickRulesBtn: function() {
+ const key = "rr_" + this.vname;
+ if (!localStorage.getItem(key)) {
+ localStorage.setItem(key, '1');
+ document.getElementById("rulesBtn").classList.remove("highlightRules");
+ }
+ this.$emit("showrules");
+ },
gotoMove: function(index) {
// Goto move except if click on current move:
if (this.cursor != index) this.$emit("goto-move", index);
.td.highlight-lm
background-color: plum
+.highlightRules
+ padding: 3px 5px
+ background-color: yellow
+
#boardSizeBtnContainer
width: 100%
text-align: center
"Play opponent's pieces": "Play opponent's pieces",
"Powerful pieces": "Powerful pieces",
"Prolongated captures": "Prolongated captures",
+ "Protect your pawns": "Protect your pawns",
"Push and pull": "Push and pull",
"Queen disguised as a pawn": "Queen disguised as a pawn",
"Reposition pieces": "Reposition pieces",
"New correspondance game:": "Nueva partida por correspondencia:",
"New game": "Nueva partida",
"New problem": "Nuevo problema",
- News: "Noticias",
"No challenges found :( Click on 'New game'!": "No se encontró ningún desafío :( ¡Haz clic en 'Nueva partida'!",
"No games found :( Send a challenge!": "No se encontró partidas :( ¡Envía un desafío!",
"No more problems": "No mas problemas",
"Play opponent's pieces": "Jugar piezas opuestas",
"Powerful pieces": "Piezas poderosas",
"Prolongated captures": "Capturas extendidas",
+ "Protect your pawns": "Protege tus peones",
"Push and pull": "Empujar y tirar",
"Queen disguised as a pawn": "Reina disfrazada de peón",
"Reposition pieces": "Reposicionar las piezas",
"Play opponent's pieces": "Jouez les pièces adverses",
"Powerful pieces": "Pièces puissantes",
"Prolongated captures": "Captures prolongées",
+ "Protect your pawns": "Protégez vos pions",
"Push and pull": "Pousser et tirer",
"Queen disguised as a pawn": "Reine déguisée en pion",
"Reposition pieces": "Replacer les pièces",
-p.boxed TODO
+p.boxed
+ | Capture all enemy pawns to win.
+
+p.
+ The king is a normal piece: there are no checks or checkmate.
+ A player loses when he has no pawns remaining.
+ Pawns can disappear by capture or promotion.
+ Pawns always promote to kings.
+
+figure.diagram-container
+ .diagram
+ | fen:4n3/k3p2p/8/2r5/8/2K5/2P5/2RB4:
+ figcaption White to play: the c2 pawn cannot be defended.
+
+h3 Source
+
+p
+ | The
+ a(href="https://www.chessvariants.com/winning.dir/kinglet.html")
+ | Kinglet variant
+ | on chessvariants.com.
+
+p Inventor: Vernon R. Parton (1953)
-p.boxed TODO
+p.boxed
+ | Captura todos los peones opuestos para ganar.
+
+p.
+ El rey es una pieza normal: no hay jaque ni jaque mate.
+ Un jugador pierde cuando se queda sin peones.
+ Los peones desaparecen por captura o por promoción.
+ Los peones siempre son promovidos a reyes.
+
+figure.diagram-container
+ .diagram
+ | fen:4n3/k3p2p/8/2r5/8/2K5/2P5/2RB4:
+ figcaption Las blancas para jugar: se capturará el peón c2.
+
+h3 Fuente
+
+p
+ | La
+ a(href="https://www.chessvariants.com/winning.dir/kinglet.html")
+ | variante Kinglet
+ | en chessvariants.com.
+
+p Inventor: Vernon R. Parton (1953)
-p.boxed TODO
+p.boxed
+ | Capturez tous les pions adverses pour gagner.
+
+p.
+ Le roi est une pièce normale : il y a ni échec ni mat.
+ Un joueur perd quand il n'a plus de pions.
+ Les pions disparaissent soit par capture, soit par promotion.
+ Les pions sont toujours promus en rois.
+
+figure.diagram-container
+ .diagram
+ | fen:4n3/k3p2p/8/2r5/8/2K5/2P5/2RB4:
+ figcaption Trait aux blancs: le pion c2 va être capturé.
+
+h3 Source
+
+p
+ | La
+ a(href="https://www.chessvariants.com/winning.dir/kinglet.html")
+ | variante Kinglet
+ | sur chessvariants.com.
+
+p Inventeur : Vernon R. Parton (1953)
() => {
const myIdx = (game.players[0].sid == this.st.user.sid ? 0 : 1);
GameStorage.add(game, (err) => {
- // If an error occurred, game is not added: a tab already
- // added the game. Maybe a focused one, maybe not.
- // We know for sure that it emitted the gong start sound.
- // ==> Do not play it again.
- if (!err && this.st.settings.sound)
- new Audio("/sounds/newgame.flac").play().catch(() => {});
+ // If an error occurred, game is not added: the focused tab
+ // already added the game.
if (!this.focus) {
+ if (this.st.settings.sound)
+ // This will be played several times if several hidden tabs
+ // on Hall... TODO: fix that (how ?!)
+ new Audio("/sounds/newgame.flac").play().catch(() => {});
notify(
"New live game",
{ body: "vs " + game.players[1-myIdx].name || "@nonymous" }
('Hamilton', 'Walk on a graph'),
('Horde', 'A pawns cloud'),
('Interweave', 'Interweaved colorbound teams'),
+ ('Kinglet', 'Protect your pawns'),
('Knightmate', 'Mate the knight'),
('Knightrelay1', 'Move like a knight (v1)'),
('Knightrelay2', 'Move like a knight (v2)'),