Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
be77da5
Initial plan
Copilot Sep 21, 2025
4171ed5
Fix recursive gambling issue in tavern - resolves #22
Copilot Sep 21, 2025
6e7e587
Initial plan
Copilot Sep 29, 2025
a5e7108
Implement energy system - player starts with 100 energy, fishing cons…
Copilot Sep 29, 2025
3b3ba32
Merge pull request #36 from Stephenson-Software/copilot/fix-f5c0831f-…
dmccoystephenson Sep 29, 2025
397f937
Merge pull request #29 from Stephenson-Software/copilot/fix-ed1b91bc-…
dmccoystephenson Oct 2, 2025
0ab9e85
Initial plan
Copilot Oct 2, 2025
8ce8ecf
Initial plan
Copilot Oct 2, 2025
a2c4b83
Initial plan
Copilot Oct 2, 2025
06c4f8b
Allow decimal values for bank deposits and withdrawals
Copilot Oct 2, 2025
6d2e3d8
Fix tavern gambling win message showing $0 instead of actual bet amount
Copilot Oct 2, 2025
f2f98e6
Add Config class to hold configuration options
Copilot Oct 2, 2025
35e2803
Remove trailing newline from test file
Copilot Oct 2, 2025
5f76162
Merge pull request #37 from Stephenson-Software/copilot/fix-7a41e107-…
dmccoystephenson Oct 13, 2025
c2f0f55
Merge pull request #38 from Stephenson-Software/copilot/fix-44c7da9f-…
dmccoystephenson Oct 13, 2025
0f90eb4
Merge pull request #39 from Stephenson-Software/copilot/fix-107ad07a-…
dmccoystephenson Oct 13, 2025
99d90b3
Initial plan
Copilot Oct 13, 2025
ad69dfb
Add comprehensive unit tests for JSON I/O, prompt, and tavern
Copilot Oct 13, 2025
ff272e1
Add GitHub Actions CI workflow to run unit tests
Copilot Feb 1, 2026
6da77f1
Merge pull request #41 from Stephenson-Software/copilot/expand-unit-t…
dmccoystephenson Feb 1, 2026
3e45276
Initial plan
Copilot Feb 1, 2026
8d9fd63
Add NPC system with names and backstories for all locations
Copilot Feb 1, 2026
d0ce3a0
Fix trailing whitespace in test files
Copilot Feb 1, 2026
bbf82ef
Address PR comments: fix Stats import, extract dialogue to UserInterf…
Copilot Feb 1, 2026
e4774d1
Merge pull request #45 from Stephenson-Software/copilot/expand-npc-ba…
dmccoystephenson Feb 1, 2026
6d2a243
Initial plan
Copilot Feb 1, 2026
9c7a6a8
Implement interactive fishing minigame with timing-based catches
Copilot Feb 1, 2026
003baa5
Address code review feedback: fix naming conventions
Copilot Feb 1, 2026
60b2e74
Fix test isolation issue causing test_sellFish to fail
Copilot Feb 1, 2026
b9d8228
Fix CI failure by using infinite generators for time.time mocks
Copilot Feb 1, 2026
667c703
Merge pull request #47 from Stephenson-Software/copilot/make-fishing-…
dmccoystephenson Feb 2, 2026
84955b4
Initial plan
Copilot Feb 2, 2026
113eb2e
Add interactive dialogue system with tutorial content for NPCs
Copilot Feb 2, 2026
c4d40d8
Address PR feedback: fix dialogue_options initialization and add test…
Copilot Feb 2, 2026
b4ba8e9
Improve test to avoid side effects with cleanup
Copilot Feb 2, 2026
bcbe8cc
Add 'Tell me about yourself' dialogue option for all NPCs
Copilot Feb 2, 2026
312dab7
Merge pull request #49 from Stephenson-Software/copilot/expand-dialog…
dmccoystephenson Feb 2, 2026
8d92f12
Initial plan
Copilot Feb 5, 2026
e5cb186
Implement multiple save files with SaveFileManager
Copilot Feb 5, 2026
710045c
Update .gitignore to exclude data directory
Copilot Feb 5, 2026
102ceac
Address code review feedback - improve imports and test structure
Copilot Feb 5, 2026
1e5ad90
Add multiple save files documentation to README
Copilot Feb 5, 2026
6c58c97
Address PR review comments - improve error handling, fix recursion, a…
Copilot Feb 15, 2026
39ec6fb
Expand unit tests with 14 additional test cases for SaveFileManager
Copilot Mar 4, 2026
fed01f6
Merge pull request #52 from Stephenson-Software/copilot/add-multiple-…
dmccoystephenson Mar 4, 2026
3d71296
Initial plan
Copilot Apr 19, 2026
4d79837
Merge main into develop and resolve conflicts
Copilot Apr 19, 2026
4a0fa49
Merge remote tracking commit
Copilot Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run Unit Tests

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov jsonschema

- name: Run tests with coverage
run: |
python -m pytest --verbose -vv --cov=src --cov-report=term-missing --cov-report=xml:cov.xml

- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
file: ./cov.xml
fail_ci_if_error: false
continue-on-error: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.pyc
data/*.json
__pycache__/
data/
.coverage
cov.xml
44 changes: 9 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,17 @@
# FishE

This game allows you to explore a fishing village and perform actions in it.

## UI Types

FishE now supports two different user interface types:

### Console UI (Default)
Traditional text-based interface that runs in the terminal.
```bash
python3 src/fishE.py
# or explicitly
python3 src/fishE.py --ui console
```
[![Run Unit Tests](https://github.com/Stephenson-Software/FishE/actions/workflows/test.yml/badge.svg)](https://github.com/Stephenson-Software/FishE/actions/workflows/test.yml)

### Pygame UI
Windowed interface with graphics and visual styling.
```bash
python3 src/fishE.py --ui pygame
```
This game allows you to explore a fishing village and perform actions in it.

## Features

Both interfaces provide identical game functionality:
- Fish at the docks to catch fish and earn money
- Visit the shop to sell fish and buy better bait
- Go to the bank to deposit/withdraw money
- Relax at the tavern (get drunk or gamble)
- View your stats at home
- Save/load game progress automatically

## Requirements

- Python 3.x
- pygame (for windowed UI mode)

Install pygame: `pip install pygame`
### Multiple Save Files
FishE supports multiple save files, allowing you to maintain different game progressions simultaneously. When you start the game, you'll see a save file manager that displays:

## Development
- **Existing Saves**: View all your saved games with their progress (Day, Money, Fish count, Last Modified)
- **Create New Save**: Start a fresh game in a new save slot
- **Delete Save**: Remove unwanted save files
- **Quick Load**: Load any existing save file to continue your adventure

Run tests: `./test.sh`
Run demo: `python3 demo_ui.py`
Each save file is stored in its own slot (slot_1, slot_2, etc.) in the `data/` directory, ensuring your saves never conflict with each other.
8 changes: 7 additions & 1 deletion schemas/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@
"priceForBait": {
"type": "number",
"minimum": 0
},
"energy": {
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"required": [
"fishCount",
"money",
"moneyInBank",
"fishMultiplier",
"priceForBait"
"priceForBait",
"energy"
]
}
Empty file added src/config/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions src/config/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# @author Daniel McCoy Stephenson
class Config:
def __init__(self):
# Save file paths
self.dataDirectory = "data"
self.playerSaveFile = "data/player.json"
self.statsSaveFile = "data/stats.json"
self.timeServiceSaveFile = "data/timeService.json"

# Initial player values
self.initialMoney = 20
self.initialEnergy = 100
self.initialFishCount = 0
self.initialMoneyInBank = 0.01
self.initialFishMultiplier = 1
self.initialPriceForBait = 50
Loading