All Data Structures Files Functions Variables Enumerations Enumerator Properties Defines
Static Public Member Functions
Utils Class Reference

#import <Utils.h>

Static Public Member Functions

(int) + generateRandomNumberFrom:to:
(NSString *) + getTimeStampWithFormat:
(UIColor *) + getUIColourFromRed:green:blue:
(NSString *) + secondsToMinutes:
(NSDictionary *) + loadPlistFromFile:
(void) + listAvailableFonts
(NSString *) + getActionAsString:
(NSString *) + getBooleanAsString:
(NSString *) + getDifficultyAsString:
(NSString *) + getLearningTypeAsString:
(NSString *) + getObjectAsString:
(NSString *) + getRatingAsString:
(NSString *) + getStateAsString:

Detailed Description

Definition at line 13 of file Utils.h.


Member Function Documentation

+ (int) generateRandomNumberFrom: (int)  _min
to: (int)  _max 

Generates a random number between the min and max. _min is included, _max isn't

Parameters:
thelower bound
theupper bound
therandom number

Definition at line 21 of file Utils.m.

+ (NSString *) getActionAsString: (Action _action

Returns the passed MovementDecision enum as a string

Parameters:
theaction to convert
Returns:
the string equivalent

Definition at line 115 of file Utils.m.

+ (NSString *) getBooleanAsString: (BOOL)  _bool

Returns the passed BOOL as a string

Parameters:
theBOOL to convert
Returns:
the string equivalent

Definition at line 163 of file Utils.m.

+ (NSString *) getDifficultyAsString: (Difficulty _difficulty

Returns the passed Difficulty as a string

Parameters:
theDifficulty to convert
Returns:
the NSString equivalent

Definition at line 173 of file Utils.m.

+ (NSString *) getLearningTypeAsString: (MachineLearningType _learningType

Returns the passed MachineLearningType enum as a string

Parameters:
thelearning type to convert
Returns:
the string equivalent

Definition at line 204 of file Utils.m.

+ (NSString *) getObjectAsString: (GameObjectType _object

Returns the passed GameObjectType enum as a string

Parameters:
theobject to convert
Returns:
the string equivalent

Definition at line 244 of file Utils.m.

+ (NSString *) getRatingAsString: (GameRating _rating

Returns the passed GameRating enum as a string

Parameters:
therating to convert
Returns:
the string equivalent

Definition at line 299 of file Utils.m.

+ (NSString *) getStateAsString: (CharacterStates _state

Returns the passed CharacterState enum as a string

Parameters:
thestate to convert
Returns:
the string equivalent

Definition at line 338 of file Utils.m.

+ (NSString *) getTimeStampWithFormat: (NSString*)  _format

Gets the current date/time as an NSString.

Parameters:
theformat of the string
Returns:
the timestamp string

Definition at line 31 of file Utils.m.

+ (UIColor *) getUIColourFromRed: (int)  _red
green: (int)  _green
blue: (int)  _blue 

Converts a passed RBG colour into UIColor

Parameters:
redvalue
greenvalue
bluevalue
Returns:
the UIColor

Definition at line 51 of file Utils.m.

Prints out a list of all availiable fonts (in alphabetical order)

Definition at line 94 of file Utils.m.

+ (NSDictionary *) loadPlistFromFile: (NSString*)  _filename

Loads a plist with the passed filename

Parameters:
thefilename of the plist

Definition at line 76 of file Utils.m.

+ (NSString *) secondsToMinutes: (int)  _seconds

Converts seconds into a minute string

Parameters:
theseconds
Returns:
the minutes/seconds as a string

Definition at line 61 of file Utils.m.


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