- Added subtle highliting of attempted letters - Using correct backspace character - Reduced header size a little - Added a "define" button to show word definition
This commit is contained in:
parent
f9b1457dea
commit
5b79c43551
5 changed files with 95 additions and 27 deletions
|
|
@ -7,7 +7,8 @@ export const GUESS_RESULT = {
|
|||
export const MARKERS = {
|
||||
MISS: 'm',
|
||||
RIGHT_POS: 'g',
|
||||
RIGHT_CHAR: 'y'
|
||||
RIGHT_CHAR: 'y',
|
||||
ATTEMPTED: 'a',
|
||||
};
|
||||
|
||||
class ProgressionState {
|
||||
|
|
@ -87,7 +88,13 @@ export class GameController {
|
|||
|
||||
if (this._currentWord.length <= 5) {
|
||||
if (!this._wordSource.isWord(guess)) {
|
||||
hits = {};
|
||||
for (let i = 0; i < guess.length; i++) {
|
||||
hits[guess[i]] = MARKERS.ATTEMPTED;
|
||||
}
|
||||
|
||||
return {
|
||||
hits: hits,
|
||||
guessResult: GUESS_RESULT.FOUL,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue