Keep a record of results against the computer

オープン
#160 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
data, full-stack

調査の方向性

Read js/game-store.js, js/game.js, js/config.js, and index.html; trace how a computer game ends and how Settings renders existing game data. Check npm test and the relevant tests before implementing the counter, validation, reset, and summary. Done when computer game results update once per level and side, damaged saved stats are ignored, and the tests cover counting and validation; the Undo-and-replay and resumed-game questions need a decision.

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted severity: low

Summary

Each past game stores its result and opponent, but nothing adds them up, so a player working up from easy to hard has no sense of progress. The archive keeps only 20 games, so totals need their own small record.

Where

  • js/game-store.js:48 (each entry stores result and opponent)
  • js/game-ui.js:545-554 (the list shows them per game only)

Proposal

Keep a small stats record in localStorage (new key in CONFIG.STORAGE_KEYS) with win/draw/loss per level and side, updated when a game against the computer ends. Show a one-line summary per level in Settings with a Reset button.

Who benefits

Players using the computer opponent to improve.

Open questions

  • Should games ended by Undo-and-replay or resumed from Play from here count?

Acceptance criteria

  • Finishing a game against the computer updates the right counter once
  • Reset clears it; a damaged stats record is ignored, not fatal
  • Tests for the counter and its validation

Getting started

  • Relevant files: js/game-store.js, js/game.js, js/config.js, index.html
  • How to run tests: npm ci && npm test

Filed by repo-audit/full-audit at 73cd279. Severity: low. Effort: S. audit-key: enhancement|js/game-store.js|stats

主要言語
JavaScript
スター
4
フォーク
2
平均マージ
22時間 16分
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/Static_Chess のほかの issue

TMHSDigital/Static_Chess の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。