sui
sui copied to clipboard
[example/turnip-town] Move package and README
Description
...for turnip-town (the end-to-end simulation game example).
Test Plan
New move unit tests:
turnip-town/move$ sui move test
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| sui-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 23, 2024 0:17am |
5 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| explorer | ⬜️ Ignored (Inspect) | Visit Preview | Sep 23, 2024 0:17am | |
| multisig-toolkit | ⬜️ Ignored (Inspect) | Visit Preview | Sep 23, 2024 0:17am | |
| mysten-ui | ⬜️ Ignored (Inspect) | Visit Preview | Sep 23, 2024 0:17am | |
| sui-kiosk | ⬜️ Ignored (Inspect) | Visit Preview | Sep 23, 2024 0:17am | |
| sui-typescript-docs | ⬜️ Ignored (Inspect) | Visit Preview | Sep 23, 2024 0:17am |
Thanks for the review @damirka ! Just going to address the style comments now.
That's a lot of code and looks cool!
On this, I was considering splitting this up into separate PRs for turnip, then field, then game + admin, then README -- just curious whether that would have been helpful?
Pushed an almost complete rewrite of the demo. Now, instead of demonstrating shared/permissioned access to a game between the game admin/service and the player, we are demonstrating a game that allows multiple players to interact with each other's resources.
Additionally, instead of a "weather" dynamic, crops are watered by individuals, fetching water from a well that outputs a fixed quantity of water every epoch (it does not accumulate).
The parameters of the game are now as follows:
- Turnips need as much water as their size to stay fresh every day.
- They can grow an additional 20 size units a day if given enough water (1 unit of water = 1 unit of growth).
- Each player gets access to 100 units of water per day, via their well. Water must be used in the transaction it was fetched from the well -- it cannot be stockpiled.
- If there is more than 100 units of additional water left, it is stagnant and the turnip will also lose freshness (it will rot).
- Turnips need to grow to at least 50 units before they can be harvested.
- Each player owns a field and a well. Only they can plant turnips on their field, and take water from their well.
- Any player can water crops in anybody else's field, and any player can harvest crops as well, but harvested crops go to the field owner's Kiosk.
New tests have been added for all these features -- test coverage for this package is 99.14%.
@damirka, ping (as requested), could you review please!