npc0 commited on
Commit
6caf003
Β·
verified Β·
1 Parent(s): 3d34345

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -0
README.md CHANGED
@@ -12,3 +12,87 @@ short_description: Couple game
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
15
+
16
+ # 🏠 Life Frontier: Partner's Concerto
17
+
18
+ A turn-based strategy game for couples built with Gradio.
19
+
20
+ ## Quick Start
21
+
22
+ ### Local Development
23
+ ```bash
24
+ pip install gradio
25
+ python app.py
26
+ ```
27
+
28
+ Open: http://localhost:7860
29
+
30
+ ## How to Play
31
+
32
+ ### Setup
33
+ 1. **Player 1**: Click "Create Room", get Room ID
34
+ 2. **Player 2**: Enter Room ID, click "Join Room"
35
+ 3. **Game starts** automatically when 2 players join
36
+ 4. **Others** can join as spectators
37
+
38
+ ### Gameplay
39
+ - **Goal**: Achieve highest QoL score after 8 rounds
40
+ - **Resources**: Time (24h/turn), HP, CP, Money, Stress
41
+ - **Actions**: Rest, Execute Tasks, End Turn
42
+ - **Turn-based**: Players alternate taking actions
43
+ - **Elimination**: Stress β‰₯ 20 = game over
44
+
45
+ ### Rest Actions
46
+ - **Quick Nap (3h)**: Roll dice, recover 2Γ— HP
47
+ - **Full Sleep (9h)**: Recover to HP=8, CP=4, -1 stress
48
+ - **Deep Rest (12h)**: Full recovery, -2 stress
49
+
50
+ ### Tasks
51
+ - **Work (W)**: Earn money
52
+ - **Domestic (D)**: Reduce stress
53
+ - **Health (H)**: Upgrade stats
54
+ - **Relationship (R)**: Bond + reduce stress
55
+ - **QoL (Q)**: Convert money to points
56
+
57
+ ### Winning
58
+ ```
59
+ Final QoL = Base QoL + Health Bonus - Stress
60
+ Health Bonus = (HP max - 10) Γ— 2 + (CP max - 5) Γ— 3 + Reputation
61
+ ```
62
+
63
+ ## Features
64
+
65
+ βœ… Turn-based gameplay with SQLite state
66
+ βœ… Real-time spectator mode
67
+ βœ… Public rankings system
68
+ βœ… Persistent game history
69
+ βœ… Single Docker container
70
+ βœ… No WebSocket complexity
71
+
72
+ ## Game State Management
73
+
74
+ All state stored in SQLite:
75
+ - `rooms`: Game rooms and status
76
+ - `players`: Player resources and stats
77
+ - `spectators`: Viewers list
78
+ - `rankings`: Leaderboard
79
+ - `game_history`: Completed games
80
+
81
+ ## Architecture
82
+
83
+ ```
84
+ app.py (Single File)
85
+ β”œβ”€β”€ Database Layer (SQLite)
86
+ β”œβ”€β”€ Game Logic (Turn-based)
87
+ β”œβ”€β”€ Gradio UI (3 tabs)
88
+ └── Session Management
89
+ ```
90
+
91
+ **No server, no WebSocket** - just simple turn-based updates!
92
+
93
+ ## Tips
94
+
95
+ - **Refresh** button updates game state
96
+ - **Rankings** show top players by average QoL
97
+ - **Spectators** can watch live but can't play
98
+ - **Room IDs** are permanent until game ends