ChatDiagram
Wordle · game logic · algorithms

Wordle duplicate-letter feedback algorithm

This Wordle game flowchart focuses on the scoring rule that often causes implementation mistakes: duplicate letters. After validating that a five-letter guess is allowed, the algorithm counts letters in the target word. It makes a first pass to mark exact-position matches green and reduces the available count for each matched letter.

유형 순서도표준 Sugiyama layered DAG + orthogonal routing엔진 schematex-flowchart업데이트됨 2026. 9. 22.
Wordle duplicate-letter scoring
Drawing preview
요청 내용

“Create a Wordle game flowchart for scoring one five-letter guess with duplicate letters: validate length and the allowed-word list, count letters in the target, mark exact-position matches green, reduce the remaining counts, mark non-green letters yellow only up to the remaining count, mark all other letters gray, and display tile feedback.”

그렇다면Add a hard-mode constraint checkShow an example target and guess beside scoring
이 도면에 담긴 내용

그 이면의 의사결정을 읽어 보세요.

01Input validation

The guess must have five letters and appear in the allowed list.

02Target counts

A per-letter count records how many target letters remain available.

03Green first

Exact-position matches are assigned before any yellow matches.

04Limited yellows

A non-green letter becomes yellow only while its remaining target count is positive.

Use this when implementing or teaching Wordle feedback logic, especially the duplicate-letter edge case. It describes one scored guess rather than the full six-attempt game loop.

모든 순서도 템플릿 보기 →

자주 묻는 질문

자주 묻는 질문

Why mark green tiles before yellow tiles?

Exact matches consume target-letter occurrences first, so duplicate letters are scored correctly.

Why keep letter counts?

Counts prevent a guess from receiving more green or yellow marks for a letter than the target contains.

Does this include the six-guess game loop?

No. It focuses on scoring one valid guess and can be combined with a separate round loop.