From a2feba2d918db861ea85d22887f73993c173e742 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Sun, 23 Mar 2025 00:17:59 +0000 Subject: Reorganize source, create basic threading and server Need to create main world loop and have it message with web server --- src/item.rhm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/item.rhm (limited to 'src/item.rhm') diff --git a/src/item.rhm b/src/item.rhm new file mode 100644 index 0000000..6716dbc --- /dev/null +++ b/src/item.rhm @@ -0,0 +1,21 @@ +#lang rhombus/static + +export: + Item + Stack + ItemCap + item_get_cap + +enum Item: + bronze_axe + +enum ItemCap: + none + chop + +fun item_get_cap(item :: maybe(Item)) :: ItemCap: + match item: + | Item.bronze_axe: ItemCap.chop + | ~else: ItemCap.none + +class Stack(item :: Item, quantity :: Int) -- cgit v1.2.3