horsegen: redesign character template

This commit is contained in:
2026-01-27 21:27:43 -05:00
parent e890108591
commit 98afe7384a
5 changed files with 208 additions and 584 deletions

17
horse/character.kk Normal file
View File

@@ -0,0 +1,17 @@
module horse/character
import horse/game-id
pub struct character-detail
character-id: character-id
name: string
pub fun detail(
c: character-id,
?character/show: (character-id) -> string
): character-detail
Character-detail(c, c.show)
pub fun character-detail/show(d: character-detail): string
val Character-detail(Character-id(id), name) = d
name ++ " (ID " ++ id.show ++ ")"