This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg height = '800' width = '1200'> | |
<g id="grid" stroke="#f2f2f2"> | |
<line x1="0" y1="0" x2="3000" y2="0" style="stroke-dasharray:1,58,1,0;stroke-width:3000;"/> | |
<line x1="0" y1="0" x2="0" y2="3000" style="stroke-dasharray:1,58,1,0;stroke-width:3000;"/> | |
</g> | |
</svg> | |
<br> | |
Controls: arrow keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="keysleft"> | |
move: WASD | |
<br>hold/drop: E | |
<br>pause: F | |
<br>gravity: R | |
</div> | |
<div id="keysright"> | |
zoom: + - | |
<br>fire: click | |
<br>testing: T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main> | |
<controls> | |
<div class="new-game">New Game</div> | |
<div>Moves <span class="moves">0</span> / <span class="max-moves">30</span></div> | |
</controls> | |
<board></board> | |
<colors></colors> | |
<controls> | |
<div>Skill <span class="skill">0</span></div> | |
<div><input type="range" class="level" value="10" min="3" max="10" /></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Keys<T extends readonly string[]> = Readonly<{ [key in T[number]]: key }>; | |
// const keys = ["feat1", "feat2"] as const; | |
export const makeEnumLikeFromArray = <T extends readonly string[]>(array: T) => | |
Object.fromEntries(array.map((item) => [item, item])) as Keys<T>; | |
// const a = make<typeof keys>(keys); |
OlderNewer