|
1 | | -import { RANK_OPTIONS } from "../data/levels"; |
2 | | -import { FaPlay } from "react-icons/fa"; |
| 1 | +import { LEVELS, RANK_OPTIONS } from "../data/levels"; |
| 2 | +import { FaBookOpen, FaPlay } from "react-icons/fa"; |
3 | 3 |
|
4 | 4 | type HomeScreenProps = { |
5 | 5 | selectedRank: string; |
@@ -31,6 +31,67 @@ export function HomeScreen({ |
31 | 31 | Study each board position, hide it, and recreate the stones from memory on an empty |
32 | 32 | board. |
33 | 33 | </p> |
| 34 | + <p className="source-credit"> |
| 35 | + Based on visualization exercises by{" "} |
| 36 | + <a href="https://go-welticke.com/exercises" target="_blank" rel="noreferrer"> |
| 37 | + Jonas Welticke |
| 38 | + </a>. |
| 39 | + </p> |
| 40 | + |
| 41 | + <details className="rules-box"> |
| 42 | + <summary> |
| 43 | + <FaBookOpen aria-hidden="true" /> |
| 44 | + How it works |
| 45 | + </summary> |
| 46 | + <div className="rules-content"> |
| 47 | + <p> |
| 48 | + Start with the exercise that is two levels below the first level where your rank |
| 49 | + appears. The app suggests this automatically, but you can choose another level. |
| 50 | + </p> |
| 51 | + <ul> |
| 52 | + <li>Set out to finish all problems of the level within the listed time.</li> |
| 53 | + <li>Memorize each position from top left to bottom right as well as you can.</li> |
| 54 | + <li>When you think you have it, hide the board, close your eyes for three seconds, then rebuild it from memory.</li> |
| 55 | + <li>Repeat this until you have finished all problems of that level.</li> |
| 56 | + </ul> |
| 57 | + <p>Count your mistakes:</p> |
| 58 | + <ul> |
| 59 | + <li>1 point if a stone is one intersection away from the correct spot, not diagonal.</li> |
| 60 | + <li>1 point if a stone is on the correct spot but has the wrong color.</li> |
| 61 | + <li>2 points for each remaining missing, extra, or otherwise misplaced stone.</li> |
| 62 | + </ul> |
| 63 | + <p> |
| 64 | + After the level, compare your total mistakes with the table. A low score lets you |
| 65 | + level up; a high score means you should try a lower level next time. |
| 66 | + </p> |
| 67 | + <div className="rules-table-wrap"> |
| 68 | + <table className="rules-table"> |
| 69 | + <thead> |
| 70 | + <tr> |
| 71 | + <th>Level</th> |
| 72 | + <th>Rank</th> |
| 73 | + <th>Time</th> |
| 74 | + <th>Level up</th> |
| 75 | + <th>Level down</th> |
| 76 | + </tr> |
| 77 | + </thead> |
| 78 | + <tbody> |
| 79 | + {LEVELS.map((level) => ( |
| 80 | + <tr key={level.level}> |
| 81 | + <td>{level.level}</td> |
| 82 | + <td>{level.rank}</td> |
| 83 | + <td>{level.timeLimitMinutes} min</td> |
| 84 | + <td><{level.levelUpBelow}</td> |
| 85 | + <td> |
| 86 | + {level.levelDownAbove === null ? "/" : `>${level.levelDownAbove}`} |
| 87 | + </td> |
| 88 | + </tr> |
| 89 | + ))} |
| 90 | + </tbody> |
| 91 | + </table> |
| 92 | + </div> |
| 93 | + </div> |
| 94 | + </details> |
34 | 95 |
|
35 | 96 | <div className="field-row"> |
36 | 97 | <label htmlFor="rank-select">Approximate rank</label> |
|
0 commit comments