Add a flip board option
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 76/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- css, html, javascript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 4
- Forks
- 2
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TMHSDigital/Static_Chess
-
enhancement good first issue severity: medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
TMHSDigital/Static_Chess#53 ·
-
documentation good first issue severity: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
TMHSDigital/Static_Chess#49 ·
-
documentation good first issue severity: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
TMHSDigital/Static_Chess#48 ·
-
documentation severity: medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
TMHSDigital/Static_Chess#47 ·
-
documentation good first issue severity: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TMHSDigital/Static_Chess#46 ·
Todas as issues de TMHSDigital/Static_Chess
Issues semelhantes
-
good first issue tests
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
growilabs/growi#12246 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
TMHSDigital/Free-Game-Dev-Assets#301 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100