diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-06-06 20:59:12 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-06-06 20:59:12 +0200 |
| commit | d9a54f1319cc9dcc2861cecc9edfde14cf039c5b (patch) | |
| tree | 74df791d6eda0ffe6c09cb32e5ffd76c4849cbac /engine/resource.go | |
| parent | 18592fd9f520a33ab307e496b995c1a7bf284893 (diff) | |
Add examples catalog with subcommand dispatch
- Extract game engine from package main to engine/ library package
- Create examples/ package with registry, Entry type, and BuilderDeps
- Register default world as an example (moved from main())
- Add combat example: two teams of units facing each other
- Rewrite main.go as thin dispatch: go run . example [name]
- Update README with examples catalog one-liner
Diffstat (limited to 'engine/resource.go')
| -rw-r--r-- | engine/resource.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/resource.go b/engine/resource.go new file mode 100644 index 0000000..406750c --- /dev/null +++ b/engine/resource.go @@ -0,0 +1,20 @@ +package engine + +import ( + "time" + + "age_of_empires/ecs" +) + +type ResourceSource struct { + Remaining int +} + +type ResourceGatherer struct { + MaxCapacity int + CurrentVolume int + Source ecs.Entity + LastPickupTime time.Time +} + +type ResourceStorage struct{} |
