Add a flip board option
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 76/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- css, html, javascript
Piste de recherche
Read js/board.js around createBoard and the keyboard handler, then inspect settings wiring in js/main.js, the toggles in index.html, and board styling in css/board.css. Run npm test and npm run lint as the issue describes. Done when the flip toggle persists after reload and the coordinates and arrow-key movement match the displayed orientation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
The board is always drawn with White at the bottom. With two people sharing one device, Black always plays upside down, and a flip option becomes necessary once a player can choose Black against a computer.
Where
js/board.js:16-27(createBoardappends squares in a fixed order)index.html:28-57(settings panel, four toggles, none for orientation)
Proposal
Add a "Flip board" toggle, persisted like the other settings. Squares carry data-row and data-col and lookups go through getSquareElement, so flipping can be done in presentation only: a class on the board that reverses the grid order, or a reversed append order in createBoard. Check that coordinate labels and the arrow-key directions in the keyboard handler (js/board.js:111-127) follow the visual orientation. Optional: flip automatically each turn.
Who benefits
The player with the black pieces.
Acceptance criteria
- A toggle flips the board and the choice survives a reload
- Coordinates and arrow keys match what is on screen
Getting started
- Relevant files:
js/board.js,js/main.js,index.html,css/board.css - How to run tests:
npm install, thennpm testandnpm run lint - Related docs:
docs/ARCHITECTURE.md,.github/CONTRIBUTING.md
Filed by repo-audit/full-audit at 8a2c86c. Severity: low. Effort: S. audit-key: enhancement|js/board.js|createBoard.orientation
- Langage dominant
- JavaScript
- Étoiles
- 4
- Forks
- 2
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TMHSDigital/Static_Chess
-
enhancement good first issue severity: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Static_Chess#53 ·
-
documentation good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
TMHSDigital/Static_Chess#49 ·
-
documentation good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
TMHSDigital/Static_Chess#48 ·
-
documentation severity: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Static_Chess#47 ·
-
documentation good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
TMHSDigital/Static_Chess#46 ·
Toutes les issues de TMHSDigital/Static_Chess
Issues similaires
-
good first issue tests
Difficulté 1/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Download a leaderboard as CSVOuverteenhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
growilabs/growi#12246 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
TMHSDigital/Free-Game-Dev-Assets#301 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100