C# Class RunicBoard

Afficher le fichier Open project: LilTsubaki/Les-fragments-d-Erule Class Usage Examples

Méthodes publiques

Méthode Description
CanLaunchSpell ( ) : bool

Check if the combination of runes exists in the database

ChangeRunePosition ( int actualPosition, int newPosition ) : bool

Change a rune's position if it doesn't break the chain to the center.

EverythingIsConnectedToCenter ( Rune>.Dictionary &board ) : bool

Check if every runes placed on the board are correctly connected to the center

GetPolesInfluence ( float &perfection, float &sublimation, float &stability ) : void

Calculates the percentage acquired from the influence of each pole on every rune.

GetRuneLinks ( ) : Element>>.List

Creates a list containing every unique link between two runes placed on the board.

GetSortedElementList ( ) : List

GetSortedElementQueue ( ) : Queue

IsConnectedToCenter ( int position, List &explored, Rune>.Dictionary &board ) : bool

Return if the position is connected to the center

LogHand ( ) : void

Display in console runes in Hand

LogRunesOnBoard ( ) : void

Display in console runes on board

PlaceRuneOnBoard ( int index, int position ) : int

Verify if you can place a rune at the position, and place it if it is OK.

RemoveAllRunes ( ) : void

Remove all runes from the runic board and put them back in the hand.

RemoveAllRunesExceptHistory ( bool ignoreSecond ) : void
RemoveAllRunesFromThisTurn ( ) : void

Remove all runes that were placed on the current turn.

RemoveRuneFromBoard ( int position, bool sendRemove = true ) : bool

Remove a rune from the board at this position, and put in back in the hand.

RunicBoard ( ) : UnityEngine
RunicBoard ( Rune>.Dictionary hand ) : UnityEngine
Testing ( ) : void

Private Methods

Méthode Description
GetAdjacentPositions ( int position ) : List

Get adjacent positions to the one in parameter.

GetNeighboursPosition ( int position ) : List

Get positions of runes adjacent to the position in parameter using runesOnBoard

GetNeighboursPosition ( int position, Rune>.Dictionary board ) : List

get positions of runes adjacent to the position in paramater, using the board in paramater

PositionExists ( int p ) : bool

Check if the position exists on the board.

Method Details

CanLaunchSpell() public méthode

Check if the combination of runes exists in the database
public CanLaunchSpell ( ) : bool
Résultat bool

ChangeRunePosition() public méthode

Change a rune's position if it doesn't break the chain to the center.
public ChangeRunePosition ( int actualPosition, int newPosition ) : bool
actualPosition int The actual position if the rune to move
newPosition int Where to place the rune
Résultat bool

EverythingIsConnectedToCenter() public méthode

Check if every runes placed on the board are correctly connected to the center
public EverythingIsConnectedToCenter ( Rune>.Dictionary &board ) : bool
board Rune>.Dictionary The board to test
Résultat bool

GetPolesInfluence() public méthode

Calculates the percentage acquired from the influence of each pole on every rune.
public GetPolesInfluence ( float &perfection, float &sublimation, float &stability ) : void
perfection float The perfection percentage.
sublimation float The sublimation percentage.
stability float The stability percentage.
Résultat void

GetRuneLinks() public méthode

Creates a list containing every unique link between two runes placed on the board.
public GetRuneLinks ( ) : Element>>.List
Résultat Element>>.List

GetSortedElementList() public méthode

public GetSortedElementList ( ) : List
Résultat List

GetSortedElementQueue() public méthode

public GetSortedElementQueue ( ) : Queue
Résultat Queue

IsConnectedToCenter() public méthode

Return if the position is connected to the center
public IsConnectedToCenter ( int position, List &explored, Rune>.Dictionary &board ) : bool
position int The position to test
explored List List of explored positions
board Rune>.Dictionary The board to test
Résultat bool

LogHand() public méthode

Display in console runes in Hand
public LogHand ( ) : void
Résultat void

LogRunesOnBoard() public méthode

Display in console runes on board
public LogRunesOnBoard ( ) : void
Résultat void

PlaceRuneOnBoard() public méthode

Verify if you can place a rune at the position, and place it if it is OK.
public PlaceRuneOnBoard ( int index, int position ) : int
index int The index in runesInHand list
position int The position where the rune will be placed
Résultat int

RemoveAllRunes() public méthode

Remove all runes from the runic board and put them back in the hand.
public RemoveAllRunes ( ) : void
Résultat void

RemoveAllRunesExceptHistory() public méthode

public RemoveAllRunesExceptHistory ( bool ignoreSecond ) : void
ignoreSecond bool
Résultat void

RemoveAllRunesFromThisTurn() public méthode

Remove all runes that were placed on the current turn.
public RemoveAllRunesFromThisTurn ( ) : void
Résultat void

RemoveRuneFromBoard() public méthode

Remove a rune from the board at this position, and put in back in the hand.
public RemoveRuneFromBoard ( int position, bool sendRemove = true ) : bool
position int The position where the rune is expected to be
sendRemove bool
Résultat bool

RunicBoard() public méthode

public RunicBoard ( ) : UnityEngine
Résultat UnityEngine

RunicBoard() public méthode

public RunicBoard ( Rune>.Dictionary hand ) : UnityEngine
hand Rune>.Dictionary
Résultat UnityEngine

Testing() public méthode

public Testing ( ) : void
Résultat void