Unreal Snake Game 1.0.0
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
USG_GameUserSettings Class Reference
Inheritance diagram for USG_GameUserSettings:

Classes

struct  FGridData
 
struct  FSpeedData
 

Public Member Functions

TArray< FString > GameSpeedOptions () const
 
FString CurrentGameSpeedOption () const
 
TArray< FString > GridSizeOptions () const
 
FString CurrentGridSizeOption () const
 
void SaveSnakeSettings (EGameSpeed GameSpeed, EGridSize GridSize)
 
EGameSpeed GameSpeedByName (const FString &Name) const
 
EGridSize GridSizeByName (const FString &Name) const
 
float GameSpeed () const
 
SnakeGame::Dim GridSize () const
 

Static Public Member Functions

static USG_GameUserSettingsGet ()
 

Private Member Functions

template<typename MapType , typename EnumType >
EnumType FindOptionByNameOrDefault (const MapType &Map, const FString &Name, EnumType Default) const
 
template<typename MapType >
TArray< FString > OptionNames (const MapType &Map) const
 

Private Attributes

const TMap< EGameSpeed, FSpeedDataGameSpeeds
 
const TMap< EGridSize, FGridDataGridSizes
 
FSpeedData CurrentSpeed {GameSpeeds[EGameSpeed::Snake]}
 
FGridData CurrentGridSize {GridSizes[EGridSize::Size_50x15]}
 

Member Data Documentation

◆ GameSpeeds

const TMap<EGameSpeed, FSpeedData> USG_GameUserSettings::GameSpeeds
private
Initial value:
{
{EGameSpeed::Worm, {"Worm", 0.3f}},
{EGameSpeed::Snake, {"Snake", 0.1f}},
{EGameSpeed::Python, {"Python", 0.05f}},
}

◆ GridSizes

const TMap<EGridSize, FGridData> USG_GameUserSettings::GridSizes
private
Initial value:
{
{EGridSize::Size_30x10, {"30x10", SnakeGame::Dim{30, 10}}},
{EGridSize::Size_50x15, {"50x15", SnakeGame::Dim{50, 15}}},
{EGridSize::Size_80x20, {"80x20", SnakeGame::Dim{80, 20}}},
}
Definition: Types.h:12

The documentation for this class was generated from the following files: