Whiteboard is a shared-device, pass-and-play football strategy game. Two players use one device: offense draws first, passes the device, defense responds, then both plans reveal simultaneously.
- Next.js App Router
- TypeScript
- Tailwind CSS
- SVG field + piece rendering
- Fully client-side (no backend, auth, DB, or networking)
npm install
npm run devThen open http://localhost:3000.
- Offense design: align offense, select assignment, draw snapped movement path.
- Pass device overlay appears.
- Defense design: align defense, assign, draw paths.
- Lock + reveal: all pieces animate simultaneously.
- Evaluation: separation is measured at movement end.
- 5-second discussion screen.
- Next round begins with a new random situation.
Offense stays on offense for the full match. First to 3 round wins takes the match.
The engine rotates these scenarios:
- 1st & 10
- 3rd & 6
- Red Zone
Each situation sets:
- Required yards
- Ball spot yard line
- A textual description
- Coordinate system is in yards.
1 yard = fixed pixel unit(YARD_TO_PXincoordinateSystem.ts).- Player drag and path points snap to integer yard coordinates.
- Paths are saved as ordered arrays of snapped yard points.
At reveal completion:
- Offensive eligibles: WR/TE/RB.
- For each eligible, find nearest defender distance.
- If nearest defender is more than 2 yards, the eligible is OPEN.
- A round is offensive success if any eligible is both:
- Open, and
- Finished at/after required yardage from line of scrimmage.
If a defender is assigned Man:
- User picks an offensive target.
- During animation, defender does not run its own path.
- Defender mirrors the target’s movement path with a slight trailing offset.
- Zone/Blitz/Contain follow their own snapped paths.
src/
app/
layout.tsx
page.tsx
globals.css
components/
AssignmentPanel.tsx
Field.tsx
PlayerPiece.tsx
RevealOverlay.tsx
Scoreboard.tsx
lib/
coordinateSystem.ts
movementEngine.ts
separationEngine.ts
situationEngine.ts
snapping.ts