Phase 1.1: Global state refactor into GameState struct with JSON serialization #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The original C code uses global variables extensively (
Country country,GArray *users,gint season,gint week,gint counters[],gint status[],gpointer statp, etc.). These are defined insrc/variables.h. For a web game, we need proper state management.Tasks
GameStatestruct that encapsulates all global statecountry,users,season,week,week_round,counters,transfer_list,season_stats,cur_user,bets,jobs,job_teams,strategies,name_lists,lg_commentary,current_interestjson.Marshaler/json.Unmarshaler)SaveGame()andLoadGame()functionsstate.Country,state.Users, etc.Files Affected
go/code/*.gofiles reference globalsvariables.hequivalents in GoAcceptance Criteria