me-imfhd/com-game

โ˜… 0Forks 0TypeScriptGitHub โ†—Compare

README

Commitment Game

A commitment-based challenge game where players bet on themselves to complete tasks, redeem their stake over time, and earn bonuses from those who quit.

To install dependencies:

bun install

To run:

bun run src/index.ts

This project was created using bun init in bun v1.1.38. Bun is a fast all-in-one JavaScript runtime.

Game Test Output - Generated on 2025-07-17T14:58:21.581Z Test executed at: /Users/meimfhd/Personal/com-game/test-output-2025-07-17T14-58-21-576Z.txt

๐Ÿ”ฅ Starting Calorie Burn Challenge Game Test Target: Burn 1000 calories with 5 checkpoints (200 calories each) Stack size: $10.00, Players with different multipliers

๐ŸŽฎ STEP 1: GameMaster creates the calorie burn game โœ… Game created: 1000 Calorie Burn Challenge Stack size: $10.00 Total checkpoints: 5 Game ID: 7edb0954-b11b-4143-bae0-f6309c72a62e

๐Ÿ‘ฅ STEP 2: Players join the game Alice joined with 2x multiplier = $20.00 stake Bob joined with 1x multiplier = $10.00 stake Charlie joined with 3x multiplier = $30.00 stake Diana joined with 1x multiplier = $10.00 stake Eve joined with 2x multiplier = $20.00 stake

๐Ÿ’ฐ Total pool: $90.00 Players: 5/10

๐Ÿš€ STEP 3: GameMaster starts the game โœ… Game started! State: IN_PROGRESS

๐Ÿƒโ€โ™€๏ธ STEP 4: Players burn calories and submit proofs

๐Ÿ‘ค Alice's journey (completes all checkpoints): ๐Ÿ“ Submitted proof for checkpoint 1 โœ… Checkpoint 1 approved by GameMaster ๐Ÿ“ Submitted proof for checkpoint 2 โœ… Checkpoint 2 approved by GameMaster ๐Ÿ“ Submitted proof for checkpoint 3 โœ… Checkpoint 3 approved by GameMaster ๐Ÿ“ Submitted proof for checkpoint 4 โœ… Checkpoint 4 approved by GameMaster ๐Ÿ“ Submitted proof for checkpoint 5 โœ… Checkpoint 5 approved by GameMaster

๐Ÿ‘ค Bob's journey (cashes out at checkpoint 3): โœ… Checkpoint 1 completed โœ… Checkpoint 2 completed โœ… Checkpoint 3 completed ๐Ÿ’ธ Bob cashed out: Cashout at checkpoint 3: $6.00

๐Ÿ‘ค Charlie's journey (completes all checkpoints): โœ… Checkpoint 1 completed โœ… Checkpoint 2 completed โœ… Checkpoint 3 completed โœ… Checkpoint 4 completed โœ… Checkpoint 5 completed

๐Ÿ‘ค Diana's journey (cashes out at checkpoint 2): โœ… Checkpoint 1 completed โœ… Checkpoint 2 completed ๐Ÿ’ธ Diana cashed out: Cashout at checkpoint 2: $4.00

๐Ÿ‘ค Eve's journey (cashes out at checkpoint 1): โœ… Checkpoint 1 completed ๐Ÿ’ธ Eve cashed out: Cashout at checkpoint 1: $4.00

๐Ÿ STEP 5: GameMaster ends the game โœ… Game ended! Final state: ENDED

๐Ÿ“Š FINAL RESULTS & PAYOUTS

๐Ÿ’ฐ Financial Summary: Total Pool: $90.00 Total Cashouts: $14.00 Bonus Pool: $26.00

๐Ÿ† Winners (completed all checkpoints): Alice: - Original stake: $20.00 - Bonus won: $10.40 - Total payout: $30.40 - Net profit: $10.40 Charlie: - Original stake: $30.00 - Bonus won: $15.60 - Total payout: $45.60 - Net profit: $15.60

๐Ÿ’ธ Players who cashed out: Bob: - Original stake: $10.00 - Cashed out at checkpoint 3: $6.00 - Forfeited: $4.00 - Net loss: $4.00 Diana: - Original stake: $10.00 - Cashed out at checkpoint 2: $4.00 - Forfeited: $6.00 - Net loss: $6.00 Eve: - Original stake: $20.00 - Cashed out at checkpoint 1: $4.00 - Forfeited: $16.00 - Net loss: $16.00

๐Ÿงฎ VERIFICATION:

โœ… All calculations verified! Game completed successfully. ๐ŸŽ‰ Alice and Charlie burned all 1000 calories and won bonuses! ๐Ÿ’ธ Bob, Diana, and Eve cashed out early but still got partial returns.

Contributors

me-imfhd

Issues