@@ -114,12 +114,12 @@ var ChessGame = {
opponentClockTime: 30,
clockTotalTime: 30,
showPromotionDialog: false,
- pendingMove: {
- source: null,
- target: null,
- piece: null,
- turn: null,
- },
+ pendingMove: {
+ source: null,
+ target: null,
+ piece: null,
+ turn: null,
+ },
l10n: {
stringYouWon: '',
stringYouCheck: '',
@@ -472,7 +472,7 @@ var ChessGame = {
var turn = this.playercolor ? this.state.moveno % 2 != 0 : this.state.moveno % 2 == 0;
if (!this.opponentuser || (this.opponentuser && turn)) {
this.removeGreySquares();
- const piece = this.board.position()[source];
+ const piece = this.board.position()[source];
const isWhitePawn = piece === 'wP';
const isBlackPawn = piece === 'bP';
const isLastRank = target[1] === '8';
diff --git a/activities/Chess.activity/locales/fr.json b/activities/Chess.activity/locales/fr.json
index 1f050f1250..55f0cc1723 100644
--- a/activities/Chess.activity/locales/fr.json
+++ b/activities/Chess.activity/locales/fr.json
@@ -21,7 +21,7 @@
"PrevShort": "Préc",
"NextShort": "Suiv",
"EndShort": "Fin",
- "PromotionTitle":"Choisissez l'élément promotionnel",
+ "PromotionTitle":"Choix de la promotion",
"TutoWelcomeTitle": "Activité Chess",
"TutoWelcomeContent": "L'activité Chess vous permet d'apprendre ou défier vos amis au célèbre jeu d'échecs",
"TutoBoardTitle": "Plateau de jeu",
From 80b3dc088aeaa8a903bc840af7c173add20e9ff7 Mon Sep 17 00:00:00 2001
From: Snehal Srivastava
<118104081+SnehalSrivastava27@users.noreply.github.com>
Date: Thu, 23 Jan 2025 18:41:27 +0530
Subject: [PATCH 6/7] Indentation fixed
---
activities/Chess.activity/js/chessGame.js | 59 +++++++++++------------
1 file changed, 29 insertions(+), 30 deletions(-)
diff --git a/activities/Chess.activity/js/chessGame.js b/activities/Chess.activity/js/chessGame.js
index 52b48d00db..ebd0311fdc 100644
--- a/activities/Chess.activity/js/chessGame.js
+++ b/activities/Chess.activity/js/chessGame.js
@@ -17,23 +17,23 @@ var ChessGame = {
-
+
@@ -83,8 +83,7 @@ var ChessGame = {
- `
- ,
+ `,
props: ['currentuser', 'opponentuser', 'presence', 'ishost', 'humane'],
data: function() {
return {
@@ -472,22 +471,22 @@ var ChessGame = {
var turn = this.playercolor ? this.state.moveno % 2 != 0 : this.state.moveno % 2 == 0;
if (!this.opponentuser || (this.opponentuser && turn)) {
this.removeGreySquares();
- const piece = this.board.position()[source];
- const isWhitePawn = piece === 'wP';
- const isBlackPawn = piece === 'bP';
- const isLastRank = target[1] === '8';
- const isFirstRank = target[1] === '1';
+ const piece = this.board.position()[source];
+ const isWhitePawn = piece === 'wP';
+ const isBlackPawn = piece === 'bP';
+ const isLastRank = target[1] === '8';
+ const isFirstRank = target[1] === '1';
- if ((isWhitePawn && isLastRank) || (isBlackPawn && isFirstRank)) {
+ if ((isWhitePawn && isLastRank) || (isBlackPawn && isFirstRank)) {
this.pendingMove = {
- source: source,
- target: target,
- piece: piece,
- turn: turn
+ source: source,
+ target: target,
+ piece: piece,
+ turn: turn
};
this.showPromotionDialog = true;
return; // Wait for promotion choice
- }
+ }
var move = this.state.move(source, target);
// illegal move
From f9a5f07b6a1e1df8500306c8651f2cabdbba275d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lionel=20Lask=C3=A9?=
Date: Sat, 25 Jan 2025 21:49:13 +0100
Subject: [PATCH 7/7] Update CHANGELOG
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3e0f98d38..8be5a54adc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- No Move Hint for "En passant" in Chess Activity #1707
- Info Update : Planet Activity #1709
- Minute numbers still visible in clock activity even after switching to Nice Clock #1713
+- Default Promotion to Queen in Chess Activity #1704
## [1.8.0] - 2024-04-10
### Added