candycore/honey-flap
最新稳定版本:v0.2.0
Composer 安装命令:
composer create-project candycore/honey-flap
包简介
Flappy-Bird-style game — port of kbrgl/flapioca on the SugarCraft stack.
README 文档
README
HoneyFlap
Flappy-Bird-style game on the SugarCraft stack — port of kbrgl/flapioca. The bird's vertical motion is a HoneyBounce projectile (gravity + an upward velocity kick on each tap), pipes scroll left at a fixed cell rate, collision is per-cell.
Run it
composer install ./bin/honey-flap
Keys
| Key | Action |
|---|---|
Space / ↑ / w |
Flap |
r |
Restart |
q / Esc |
Quit |
Architecture
| File | Role |
|---|---|
Bird |
Wraps a HoneyBounce Projectile — gravity pulls it down, flap() resets vertical velocity to a fixed kick. |
Pipe |
Single-column pipe pair with a centred gap. Slides left one cell per tick. |
TickMsg |
Frame-tick message scheduled by Cmd::tick(0.033, …) ≈ 30 fps. |
Game (Model) |
Pure-state world: bird + pipes + score + crashed flag. Injects PRNG closure for deterministic gap placements in tests. |
Renderer |
Pure view — single playfield walk, ANSI-styled glyphs, rounded border. |
The PRNG is injected as a Closure(int $maxInclusive): int so unit tests can pin the pipe layout to a specific sequence — the standard SugarCraft pattern.
Test
composer install vendor/bin/phpunit
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-07
