C# Класс RunicBoard

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

CanLaunchSpell() публичный Метод

Check if the combination of runes exists in the database
public CanLaunchSpell ( ) : bool
Результат bool

ChangeRunePosition() публичный Метод

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
Результат bool

EverythingIsConnectedToCenter() публичный Метод

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
Результат bool

GetPolesInfluence() публичный Метод

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.
Результат void

GetRuneLinks() публичный Метод

Creates a list containing every unique link between two runes placed on the board.
public GetRuneLinks ( ) : Element>>.List
Результат Element>>.List

GetSortedElementList() публичный Метод

public GetSortedElementList ( ) : List
Результат List

GetSortedElementQueue() публичный Метод

public GetSortedElementQueue ( ) : Queue
Результат Queue

IsConnectedToCenter() публичный Метод

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
Результат bool

LogHand() публичный Метод

Display in console runes in Hand
public LogHand ( ) : void
Результат void

LogRunesOnBoard() публичный Метод

Display in console runes on board
public LogRunesOnBoard ( ) : void
Результат void

PlaceRuneOnBoard() публичный Метод

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
Результат int

RemoveAllRunes() публичный Метод

Remove all runes from the runic board and put them back in the hand.
public RemoveAllRunes ( ) : void
Результат void

RemoveAllRunesExceptHistory() публичный Метод

public RemoveAllRunesExceptHistory ( bool ignoreSecond ) : void
ignoreSecond bool
Результат void

RemoveAllRunesFromThisTurn() публичный Метод

Remove all runes that were placed on the current turn.
public RemoveAllRunesFromThisTurn ( ) : void
Результат void

RemoveRuneFromBoard() публичный Метод

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
Результат bool

RunicBoard() публичный Метод

public RunicBoard ( ) : UnityEngine
Результат UnityEngine

RunicBoard() публичный Метод

public RunicBoard ( Rune>.Dictionary hand ) : UnityEngine
hand Rune>.Dictionary
Результат UnityEngine

Testing() публичный Метод

public Testing ( ) : void
Результат void