Compare commits

..

2 Commits

Author SHA1 Message Date
Alexander Whitestone
0b2ab87dbc feat: add export/import save and keyboard shortcuts (rescued from #48)
- exportSave(): copy save data to clipboard
- importSave(): paste save data, validate, reload
- toggleHotkeyHelp(): keyboard shortcut overlay
- Keyboard: ? for help, Esc to close
2026-04-10 20:36:53 -04:00
Alexander Whitestone
68ee64866a beacon: add Open Weights and Prompt Engineering research projects
Two new Phase 2 research projects that fill the gap between building
a Home Server and reaching Phase 3 (Deployment):

- Open Weights (compute: 3000, code: 1500): Triggers after having a
  server and 1000 total code. Rewards 2x code boost and 1.5x compute
  boost. Teaches about running models locally without cloud dependency.

- Prompt Engineering (knowledge: 500, code: 2000): Triggers after
  200 knowledge and 3000 total code. Rewards 2x knowledge and 2x user
  boost. Teaches that good prompting beats bigger models.

Both projects follow the game's existing pattern: unlock based on
total resources, cost resources, apply boosts, and log educational
messages. They give players more strategic options in early-to-mid
game progression.
2026-04-10 20:01:10 -04:00
3 changed files with 93 additions and 1499 deletions

View File

@@ -1,27 +0,0 @@
name: Accessibility Checks
on:
pull_request:
branches: [main]
jobs:
a11y-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate ARIA Attributes in game.js
run: |
echo "Checking game.js for ARIA attributes..."
grep -q "aria-label" game.js || (echo "ERROR: aria-label missing from game.js" && exit 1)
grep -q "aria-valuenow" game.js || (echo "ERROR: aria-valuenow missing from game.js" && exit 1)
grep -q "aria-pressed" game.js || (echo "ERROR: aria-pressed missing from game.js" && exit 1)
- name: Validate ARIA Roles in index.html
run: |
echo "Checking index.html for ARIA roles..."
grep -q "role=" index.html || (echo "ERROR: No ARIA roles found in index.html" && exit 1)
- name: Syntax Check JS
run: |
node -c game.js

1551
game.js

File diff suppressed because it is too large Load Diff

View File

@@ -144,6 +144,8 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
<button id="sprint-btn" class="main-btn" onclick="activateSprint()" style="font-size:11px;padding:8px 10px;border-color:#ffd700;color:#ffd700;width:100%">⚡ CODE SPRINT — 10x Code for 10s</button>
<div id="sprint-bar-wrap" style="display:none;margin-top:4px;height:4px;background:#111;border-radius:2px;overflow:hidden"><div id="sprint-bar" style="height:100%;background:linear-gradient(90deg,#ffd700,#ff8c00);border-radius:2px;transition:width 0.1s"></div></div>
<div id="sprint-label" style="font-size:9px;color:#666;margin-top:2px;text-align:center"></div>
<button class="save-btn" onclick="exportSave()" title="Export save">Export</button>
<button class="save-btn" onclick="importSave()" title="Import save">Import</button>
</div>
<div id="alignment-ui" style="display:none"></div>
<button class="save-btn" onclick="saveGame()">Save Game [Ctrl+S]</button>
@@ -231,5 +233,15 @@ The light is on. The room is empty."
</div>
<div id="toast-container"></div>
<div id="hotkey-overlay" style="display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.85);z-index:9999;justify-content:center;align-items:center;flex-direction:column;color:#e0e0e0;font-family:monospace">
<h2 style="color:#00ff88;margin-bottom:20px">Keyboard Shortcuts</h2>
<div style="text-align:left;line-height:2">
<b>S</b> — Activate Sprint<br>
<b>B</b> — Cycle buy amount (1/10/MAX)<br>
<b>?</b> — Toggle this help<br>
<b>Esc</b> — Close overlay
</div>
<button onclick="toggleHotkeyHelp()" style="margin-top:20px;padding:8px 20px;background:#333;color:#00ff88;border:1px solid #00ff88;cursor:pointer">Close</button>
</div>
</body>
</html>
</html>