{"id":48217695,"url":"https://github.com/cdilga/ultimate-risk","last_synced_at":"2026-04-04T19:01:43.951Z","repository":{"id":331222599,"uuid":"1125773724","full_name":"cdilga/ultimate-risk","owner":"cdilga","description":"An strategy war game that involves multiple players.","archived":false,"fork":false,"pushed_at":"2025-12-31T10:40:45.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-04T15:38:16.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdilga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T10:33:33.000Z","updated_at":"2025-12-31T10:40:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cdilga/ultimate-risk","commit_stats":null,"previous_names":["cdilga/ultimate-risk"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cdilga/ultimate-risk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdilga%2Fultimate-risk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdilga%2Fultimate-risk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdilga%2Fultimate-risk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdilga%2Fultimate-risk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdilga","download_url":"https://codeload.github.com/cdilga/ultimate-risk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdilga%2Fultimate-risk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31409471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T19:01:43.249Z","updated_at":"2026-04-04T19:01:43.939Z","avatar_url":"https://github.com/cdilga.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ultimate Risk - WW2 Strategy Game\n\nA turn-based World War 2 strategy game featuring historically accurate nations, units, and territories in the European theatre.\n\n## 🎮 Game Features\n\n- **6 Historical Nations**: Nazi Germany, Great Britain, United States, Canada, France, Soviet Union\n- **Historical Leaders**: Each nation led by their actual WW2 leader (Hitler, Churchill, Roosevelt, etc.)\n- **24 European Territories**: Historically accurate map of Europe including land and naval zones\n- **4 Unit Types**: Infantry, Vehicles, Naval, and Aircraft - all historically accurate\n- **Turn-Based Gameplay**: Purchase phase, Combat phase, Movement phase, and Income collection\n- **Currency System**: Earn income from controlled territories to purchase units\n- **Combat System**: Dice-based combat with attack and defense values\n- **Mobile \u0026 Desktop**: Fully responsive design works on all devices\n\n## 🌐 Live Deployment\n\n🚀 **Production**: [https://ultimate-risk.dilger.dev](https://ultimate-risk.dilger.dev)\n\n## 🚀 Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/cdilga/ultimate-risk.git\ncd ultimate-risk\n\n# Install dependencies\nnpm install\n\n# Run locally\nnpm run dev\n```\n\nVisit `http://localhost:8787` to play the game.\n\n## 🎯 How to Play\n\n1. **Start a New Game**: Click \"New Game\" to begin with 4 players (Germany, Britain, USA, Russia)\n2. **Purchase Phase**: Use your starting currency to buy units (Infantry, Vehicles, Naval, Aircraft)\n3. **Deploy Units**: Place purchased units in territories you control\n4. **Movement Phase**: Move units to adjacent territories\n5. **Combat**: When units move into enemy territories, combat is automatically resolved\n6. **Collect Income**: At the end of your turn, collect income based on territory values\n7. **Next Turn**: Click \"Next Phase\" to advance through the game phases\n\n## 🗺️ Nations \u0026 Units\n\n### Nazi Germany\n- Leader: Adolf Hitler (Führer)\n- Infantry: SS Infantry\n- Vehicle: Panzer IV\n- Naval: U-boat\n- Aircraft: Bf 109\n\n### Great Britain\n- Leader: Winston Churchill (Prime Minister)\n- Infantry: SAS Rogue\n- Vehicle: Churchill Tank\n- Naval: U-class Submarine\n- Aircraft: Supermarine Spitfire\n\n### United States\n- Leader: Franklin D. Roosevelt (President)\n- Infantry: Army Rangers\n- Vehicle: M4 Sherman\n- Naval: Fletcher-class Destroyer\n- Aircraft: B-17 Flying Fortress\n\n### Canada\n- Leader: William Lyon Mackenzie King (Prime Minister)\n- Infantry: Devils Brigade\n- Vehicle: Ram Tank\n- Naval: Tribal-class Destroyer\n- Aircraft: de Havilland Mosquito\n\n### France\n- Leader: Charles de Gaulle (General)\n- Infantry: French Resistance\n- Vehicle: Char B1\n- Naval: Surcouf Submarine\n- Aircraft: Dewoitine D.520\n\n### Soviet Union\n- Leader: Joseph Stalin (General Secretary)\n- Infantry: Guards Infantry\n- Vehicle: T-34\n- Naval: S-class Submarine\n- Aircraft: Yakovlev Yak-3\n\n## 🔌 API Endpoints\n\nThe game exposes a RESTful API for all game operations:\n\n### Game Management\n- `POST /api/game/new` - Create a new game\n- `GET /api/game/state?gameId={id}` - Get current game state\n- `POST /api/game/next-phase` - Advance to next phase\n\n### Game Actions\n- `POST /api/game/purchase` - Purchase units\n- `POST /api/game/deploy` - Deploy units to territories\n- `POST /api/game/move` - Move units between territories\n- `POST /api/game/combat` - Resolve combat in a territory\n\n### Data\n- `GET /api/nations` - Get all nation data\n- `GET /api/territories` - Get all territory data\n\n## 📦 Deployment\n\nThis project automatically deploys to Cloudflare Workers when you push to the main branch.\n\n### Manual Deployment\n```bash\nnpm run deploy\n```\n\n## 🛠️ Development\n\n### Local Development\n```bash\n# Start development server\nnpm run dev\n\n# Run unit tests\nnpm test\n\n# Run E2E tests\nnpm run test:e2e\n\n# Test against deployed site\nnpm run test:deployed\n```\n\n### Project Structure\n```\nsrc/\n├── index.js          # Main Worker with API routes and UI\n├── gameData.js       # Historical data (nations, territories, units)\n└── gameLogic.js      # Game state and rules engine\n```\n\n### Testing\n- Unit tests use Vitest with Cloudflare Workers pool\n- E2E tests use Playwright\n- Tests can run against local dev server or production\n\n## 🎵 Audio\n\nThe game includes a placeholder for background audio. To add the Erika Marschlied music:\n1. Host the audio file on a CDN or include it in the project\n2. Update the `\u003caudio\u003e` tag source in `src/index.js` (line 83)\n\n## 🏗️ Architecture\n\nBuilt on the Cloudflare Workers platform:\n- **Runtime**: Cloudflare Workers (V8 isolates)\n- **Frontend**: Vanilla JavaScript with Tailwind CSS\n- **Storage**: In-memory (can be upgraded to Durable Objects or KV)\n- **Deployment**: Automated via GitHub Actions\n\n## 🎨 Technology Stack\n\n- **Backend**: Cloudflare Workers\n- **Frontend**: Vanilla JavaScript, Tailwind CSS\n- **Testing**: Vitest, Playwright\n- **Deployment**: Wrangler CLI\n\n## 🔐 Environment Variables\n\n- `CLOUDFLARE_API_TOKEN`: Used for deployment (set in GitHub Secrets)\n- `CLOUDFLARE_ACCOUNT_ID`: Your Cloudflare account ID\n\n## 🤝 Contributing\n\nThis is a solo project created with Claude Code. Feel free to fork and modify for your own use.\n\n## 📝 Future Enhancements\n\nPotential improvements for the future:\n- Persistent game storage with Durable Objects\n- Multiplayer real-time synchronization\n- More detailed combat animations\n- Additional nations and territories\n- Diplomacy and alliance mechanics\n- Save/load game functionality\n\n## 🤖 Created with Claude\n\nThis project was automatically generated using [the-ultimate-bootstrap](https://github.com/cdilga/the-ultimate-bootstrap) and implemented by Claude Code.\n\n## 📜 License\n\nOpen source - feel free to use and modify.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdilga%2Fultimate-risk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdilga%2Fultimate-risk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdilga%2Fultimate-risk/lists"}