Skip to content

Commit 69e7f1d

Browse files
Initial commit
0 parents  commit 69e7f1d

32 files changed

+6105
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install Python dependencies
22+
run: |
23+
pip install flask flask-cors
24+
25+
- name: Start API server
26+
run: |
27+
python api.py &
28+
sleep 3
29+
30+
- name: Set up Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
34+
cache: 'npm'
35+
cache-dependency-path: frontend/package-lock.json
36+
37+
- name: Install frontend dependencies
38+
working-directory: ./frontend
39+
run: npm ci
40+
41+
- name: Install Playwright browsers
42+
working-directory: ./frontend
43+
run: npx playwright install --with-deps chromium
44+
45+
- name: Start frontend dev server
46+
working-directory: ./frontend
47+
run: npm run dev &
48+
env:
49+
CI: true
50+
51+
- name: Wait for servers
52+
run: sleep 5
53+
54+
- name: Run Playwright tests
55+
working-directory: ./frontend
56+
run: npx playwright test --reporter=line
57+
58+
deploy:
59+
needs: test
60+
runs-on: ubuntu-latest
61+
if: github.ref == 'refs/heads/master'
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Deploy to production
67+
run: |
68+
echo "Deploying to production..."
69+
# Add your deployment commands here
70+
# e.g., rsync, scp, docker, etc.

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# 🎮 Binary Hangman
2+
3+
A twist on classic hangman — decode binary ASCII to save the ghost!
4+
5+
## How to Play
6+
7+
1. **Run the game:**
8+
```bash
9+
python3 binary_hangman.py
10+
```
11+
12+
2. **Enter your name** when prompted
13+
14+
3. **Guess letters** to reveal the hidden word:
15+
- Type a letter (e.g., `A`)
16+
- OR type 7-bit binary (e.g., `1000001` for A) 🔥
17+
18+
4. **Save the ghost** before too many wrong guesses!
19+
20+
## Binary Cheat Sheet
21+
22+
| Letter | Binary | Letter | Binary |
23+
|--------|--------|--------|--------|
24+
| A | 1000001| N | 1001110|
25+
| B | 1000010| O | 1001111|
26+
| C | 1000011| P | 1010000|
27+
| D | 1000100| Q | 1010001|
28+
| E | 1000101| R | 1010010|
29+
| F | 1000110| S | 1010011|
30+
| G | 1000111| T | 1010100|
31+
| H | 1001000| U | 1010101|
32+
| I | 1001001| V | 1010110|
33+
| J | 1001010| W | 1010111|
34+
| K | 1001011| X | 1011000|
35+
| L | 1001100| Y | 1011001|
36+
| M | 1001101| Z | 1011010|
37+
38+
## Features
39+
40+
- 🎨 Colourful terminal UI
41+
- 🏆 SQLite leaderboard (persists in `~/.binary_hangman_scores.db`)
42+
- 📊 Win/loss stats tracking
43+
- 👻 ASCII ghost that gets "destroyed" as you lose
44+
45+
## Menu
46+
47+
```
48+
1. Play Game - Start a new game
49+
2. Leaderboard - View top 10 scores
50+
3. Stats - See overall statistics
51+
4. Quit - Exit
52+
```
53+
54+
## Requirements
55+
56+
- Python 3.6+
57+
- No external dependencies (uses built-in `sqlite3`)
58+
59+
## License
60+
61+
MIT

0 commit comments

Comments
 (0)