Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Examples/Turnip Town] Rewrite to leverage Kiosk Apps
This is 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%.
- Loading branch information