A clone of the 2048 game, written in TypeScript.
Source code in main.ts.
Prebuilt and HTML skeleton in dist/.
Rebuild using npm install && npx tsc .
-
I strove to use a clean code style, using functional patterns where practical. 'User-defined control structures' have been used to reduce duplication.
-
As a convention, methods are only used for functions that mutate object state. Pure functions are declared top-level.