combatHandler Class

Information about the combatHandler class. This class is responsible for handling interactions between characters.

Member Attributes

Member Methods

turn

Description: Executes the turn of the current character.

Postcondition: The turn of the current character is completed, and moves to the next character.

Raise: Exception If no characters are alive.


getAllInRange

Description: Gets all characters in given range

Returns: All characters in the range.

Parameters:

getRandomCharacterInRange

Description: Gets a random character in the specified range.

Returns: A random character in the range. None if there are none in that range.

Parameters:

addCharacter

Description: Adds a character to those alive.

Postcondition: The character has been added.

Parameters:

addLogMessage

Description: Adds a message to the log.

Postcondition: The message has been added.

Parameters:

getLog

Description: Gets the log. It is a list full of logBlock dictionaries.

Returns: A list of messages

Parameters:

flushLog

Description: Removes all entries currently in the log.

Postcondition: No messages remain in the log.