Phase 1: core engine (SRS+180 kicks, 7-bag, hold, ghost, lock delay, line clear)

- src/engine.js: 순수 코어 로직 (보드 10x40, 피스 7종, SRS+180 킥테이블,
  T-spin/mini 판정, 콤보/B2B, 7-bag, 홀드, 고스트, 락딜레이 15회 캡)
- test/engine.test.js: 24개 단위 테스트 (킥테이블·T-spin 판정·7-bag·클리어 등) 전부 통과
- src/index.template.html + build.js: 엔진을 인라인한 단일 index.html 생성
  (외부 에셋 0개). 키보드 플레이 가능 (DAS/ARR, 하드/소프트드롭, 판정 팝업)
This commit is contained in:
tkrmagid
2026-08-22 11:13:36 +09:00
parent c99a867ba7
commit 33771e932e
7 changed files with 1479 additions and 0 deletions

13
package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "tetrig",
"version": "0.1.0",
"description": "TETRIG — real-time competitive block stacker (client + Cloudflare Workers server)",
"type": "module",
"scripts": {
"test": "node --test",
"build": "node build.js",
"serve": "node build.js && node -e \"const h=require('http'),f=require('fs');h.createServer((q,s)=>{const p=q.url==='/'?'/index.html':q.url;try{s.end(f.readFileSync('.'+p))}catch(e){s.statusCode=404;s.end('404')}}).listen(8787,()=>console.log('http://localhost:8787'))\""
},
"license": "UNLICENSED",
"private": true
}