Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions serving/clef-flash/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
23 changes: 23 additions & 0 deletions serving/clef-flash/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CLEF Tetris core

This package contains the framework-independent Tetris engine and the
SystemOne request mapping used by the CLEF-Flash demo. It intentionally has no
React or wall-clock dependencies and is consumed as source by the later Vite
application rather than published as a standalone Node package.

The engine uses a seeded seven-bag generator. At each turn it enumerates every
direct hard-drop placement for the active piece and, when available, the held
piece. It simulates each result and reports cleared lines, holes, aggregate
height, maximum height, and bumpiness. Rotation coordinates use normalized SRS
shape orientations because the policy selects final placements rather than
wall-kick paths. The visible 10x20 board is the complete simulation board, and
a blocked centered spawn position ends the game. Scoring uses the classic
single/double/triple/Tetris line-clear table without drop-distance bonuses.

```sh
npm ci
npm test
npm run typecheck
npm run lint
npm run build
```
20 changes: 20 additions & 0 deletions serving/clef-flash/ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist/**'] },
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['src/**/*.ts'],
languageOptions: {
ecmaVersion: 2022,
globals: globals.browser,
},
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': 'error',
},
},
);
Loading