{memoryPhase ? "Remember all the mines!" : "Mark all the mines!"}
- {minefield.map((line, y) => (
-
-
- {line.map((cell, x) => {
- if (memoryPhase) {
- if (minefield[y][x]) return [?] ;
- return [ ] ;
- } else {
- if (x == pos[0] && y == pos[1]) return [X] ;
- if (answer[y][x]) return [.] ;
- if (hasAugment && minefield[y][x]) return [?] ;
- return [ ] ;
- }
- })}
-
-
-
- ))}
+
+ {flatGrid.map((item) => {
+ const color = item.current
+ ? Settings.theme.infolight
+ : item.marked
+ ? Settings.theme.warning
+ : Settings.theme.error;
+ return (
+
+ {item.current ? : item.flagged ? : item.marked ? : <>>}
+
+ );
+ })}
+
>