Blaze Brigade
Controller.GameFunction Class Reference

Contains functions pertaining to the general game. More...

Static Public Member Functions

static bool isAnEnemyUnitInRange (Graph graph, Unit unit)
 
static bool isEnemyUnitInRange (Graph graph, Unit unit, Unit enemyUnit)
 
static void startTurn (Player player)
 
static LinkedList< UnitenemyUnitsInRange (Graph graph, Unit unit)
 
static bool hasUnitFinishedActions (Unit unit)
 
static bool isTurnOver ()
 
static bool isGameOver ()
 
static LinkedList< NodesetMovableNodes (Graph graph, Unit unit)
 
static LinkedList< NodegetAttackableNodes (Graph graph, Unit unit)
 
static LinkedList< NodegetAttackRangeAfterMoving (Graph graph, Unit unit)
 
static LinkedList< NodepathFinder (Graph graph, Unit unit, Node start, Node end)
 

Detailed Description

Contains functions pertaining to the general game.

This class holds useable functions in the scope of the entire gameplay.

Member Function Documentation

§ enemyUnitsInRange()

static LinkedList<Unit> Controller.GameFunction.enemyUnitsInRange ( Graph  graph,
Unit  unit 
)
static

Returns all enemy units in strict attack range of the specified unit.

Parameters
graphGraph representing the current game map.
unitUnit to find enemy units for.

§ getAttackableNodes()

static LinkedList<Node> Controller.GameFunction.getAttackableNodes ( Graph  graph,
Unit  unit 
)
static

Returns a list of nodes that the unit can perform an attack on. Assumes the unit has not yet moved.

Parameters
graphGraph representing the current game map.
unitSpecfied unit.

§ getAttackRangeAfterMoving()

static LinkedList<Node> Controller.GameFunction.getAttackRangeAfterMoving ( Graph  graph,
Unit  unit 
)
static

Returns whether or not the specified enemy unit is within attack range of the specified unit. Assumes the unit has already moved.

Parameters
graphGraph representing the current game map.
Specifiedunit.

§ hasUnitFinishedActions()

static bool Controller.GameFunction.hasUnitFinishedActions ( Unit  unit)
static

Returns whether or not the specified unit can perform actions.

Parameters
unitSpecified unit.

§ isAnEnemyUnitInRange()

static bool Controller.GameFunction.isAnEnemyUnitInRange ( Graph  graph,
Unit  unit 
)
static

Returns whether an enemy unit is in range of the specified unit.

Parameters
graphGraph representing the current game map.
unitUnit to find enemies for.

§ isEnemyUnitInRange()

static bool Controller.GameFunction.isEnemyUnitInRange ( Graph  graph,
Unit  unit,
Unit  enemyUnit 
)
static

Returns whether or not the specified enemy unit is within attack range of the specified unit.

Parameters
graphGraph representing the current game map.
unitSpecified playable unit.
enemyUnitSpecified enemy unit.

§ isGameOver()

static bool Controller.GameFunction.isGameOver ( )
static

Returns whether or not the game is over, based off win conditions.

§ isTurnOver()

static bool Controller.GameFunction.isTurnOver ( )
static

Returns whether or not the current turn is over.

§ pathFinder()

static LinkedList<Node> Controller.GameFunction.pathFinder ( Graph  graph,
Unit  unit,
Node  start,
Node  end 
)
static

Returns a list of nodes representing the path from start node to end node; if not path is valid, return null.

Parameters
graphGraph representing the current game map.
unitUnit to move.
startStart Node of the path.
endEnd Node of the path

§ setMovableNodes()

static LinkedList<Node> Controller.GameFunction.setMovableNodes ( Graph  graph,
Unit  unit 
)
static

Returns a list of nodes that the unit can move onto.

Parameters
graphGraph representing the current game map.
Specifiedunit.

§ startTurn()

static void Controller.GameFunction.startTurn ( Player  player)
static

Must be called upon the start of a new turn. Resets all unit buttons and game states.

Parameters
playerPlayer of the new turn.

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