task 10 brief - xopherdeep/do-it-for-the-xp GitHub Wiki

Task 10: The tower in play: header clock, fanfare, Hometown

Files:

  • Create: src/lib/services/projects/floorClock.ts, src/app/Console/TempleGrounds/components/TempleFloorClock.vue, src/app/Console/MyPortal/HomeTown/components/ProjectTowerSheet.vue
  • Modify: src/app/Console/TempleGrounds/TempleGrounds.vue (header, beside the room name L50), src/app/Console/TempleGrounds/TempleGrounds.ts (load the project for gen-project- temples; pass floorCleared into the room context; wake the floor on arrival; show the "Floor cleared!" reveal)
  • Modify: src/app/Console/MyPortal/HomeTown/HomeTown.ts and HomeTown.vue (a project-tower spot beside old-house), src/components/organisms/BuildingModel/voxel/buildingShapes.ts (a project-tower shape)
  • Test: tests/unit/floorClock.spec.ts, tests/unit/ProjectTowerSheet.spec.ts

Interfaces:

  • Consumes: Tasks 3, 5, 7, 8.
  • Produces: floorClockLine(floor: ProjectFloor, phaseName: string, today: string, voice: Voice): string (e.g. "Deep Clean: due Sat, 3 days left"); bonusOfferLine(floor: ProjectFloor, today: string, voice: Voice): string | null ("Clear this floor today for ×1.6", null when cleared or late).
  • Step 1: Write the failing tests: the clock reads "due today" on the due day and "late" after it; the offer equals floorMultiplier(window, today) and disappears at ×1; the Hometown sheet shows the active tower's name, the current floor and its clock for heroes, and for the Game Master also "Move the end date" (calls extendProject) and "Abandon project" (confirms, then abandonProject); with no active project but a cleared one it shows the trophy (Task 11's sheet).
  • Step 2: Run both specs. Expected: FAIL.
  • Step 3: Implement. The voxel tower shape is a narrow stack of the floor count plus a roof, in the theme's colours; the BGM needs no change (the guard plays <element>-temple for gen- temples).
  • Step 4: Run both specs plus tests/unit/TempleGroundsModules.spec.ts. Expected: PASS.
  • Step 5: Lead commits feat(projects): the tower in play: floor clock, bonus offer, Hometown tower.
⚠️ **GitHub.com Fallback** ⚠️