Documentation ¶
Index ¶
- func AbortingMapGeneration(ctx echo.Context, rules game.GameRules, requestInfo model.RequestInfo) error
- func GetGameRulesFromRequest(c echo.Context) game.GameRules
- func GetMap(c echo.Context) error
- func GetMapByCode(ctx echo.Context) error
- func GetMapCode(c echo.Context) error
- func GetMapLegend(c echo.Context) error
- func GetMapViaCodeGeneration(c echo.Context) error
- func GetRequestInfoFromRequest(c echo.Context) model.RequestInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortingMapGeneration ¶ added in v0.1.0
func AbortingMapGeneration(ctx echo.Context, rules game.GameRules, requestInfo model.RequestInfo) error
AbortingMapGeneration handles aborting the attempt to generate a map, handle the error and send a response to the affected client
func GetGameRulesFromRequest ¶ added in v0.1.0
func GetMap ¶
func GetMap(c echo.Context) error
GetMap starts the Generation Cycle, which may or may not succeed with a valid map according to the supplied Game Rules
func GetMapByCode ¶ added in v0.1.0
func GetMapByCode(ctx echo.Context) error
GetMap starts the Generation Cycle, which may or may not succeed with a valid map according to the supplied Game Rules
func GetMapCode ¶ added in v0.1.0
func GetMapCode(c echo.Context) error
GetMapCode starts the Generation Cycle, which may or may not succeed with a valid map according to the supplied Game Rules It is different from GetMap because it only returns the game code
func GetMapLegend ¶
func GetMapLegend(c echo.Context) error
GetMapLegend retrieves the map Legend, helps explain codes used within the data returned by the API
func GetMapViaCodeGeneration ¶ added in v0.1.0
func GetMapViaCodeGeneration(c echo.Context) error
GetMapViaCodeGeneration Alternative approach to generating the map instead of generating the map via the structs, we generate a game code and then inflate the game code before validating the board WARNING: currently only supports default normal map
func GetRequestInfoFromRequest ¶ added in v0.1.0
func GetRequestInfoFromRequest(c echo.Context) model.RequestInfo
Types ¶
This section is empty.