How erenelagz/farm-simulator-game works
This is a browser-based, turn-based farm-management game. The player manages livestock, crops, products, and supplies; each week prices fluctuate, production and consumption update the farm, and the interface displays inventory, prices, and statistics. The marketplace supports buying and selling farm goods and supplies. The supplied source shows these responsibilities, but not the HTML wiring that binds page controls to JavaScript functions; that connection is therefore left unverified.
Main entry points: functions.js Week controller · objects.js Farm and assets · ui.js DOM bindings
Components 11
Farm state
- Farm and assets
src/js/objects.js
Weekly turn
- Price updates
src/js/functions.js - Goods production
src/js/functions.js - Resource consumption
src/js/functions.js - Week controller
src/js/functions.js
Marketplace
- Farm marketplace
src/js/functions.js - Supply supermarket
src/js/functions.js
Game interface
- Farm display
src/js/functions.js - Display reset
src/js/functions.js - DOM bindings
src/js/ui.js
Other components
- Player
Connections 18
- Player → DOM bindings: uses controls
README.md - DOM bindings → Week controller: triggers next week
- Week controller → Price updates: updates prices
src/js/functions.js - Week controller → Goods production: produces goods
src/js/functions.js - Week controller → Resource consumption: consumes supplies
src/js/functions.js - Week controller → Display reset: clears display
src/js/functions.js - Week controller → Farm display: renders farm
src/js/functions.js - Price updates → Farm and assets: updates prices
src/js/functions.js - Goods production → Farm and assets: adds goods
src/js/functions.js - Resource consumption → Farm and assets: deducts supplies
src/js/functions.js - Farm marketplace → Farm and assets: trades farm goods
src/js/functions.js - Supply supermarket → Farm and assets: trades supplies
src/js/functions.js - Farm marketplace → Display reset: clears display
src/js/functions.js - Farm marketplace → Farm display: refreshes display
src/js/functions.js - Supply supermarket → Display reset: clears display
src/js/functions.js - Supply supermarket → Farm display: refreshes display
src/js/functions.js - Farm display → Farm and assets: reads farm state
src/js/functions.js - Farm display → DOM bindings: updates page
src/js/functions.js