C# 클래스 RunicBoard

파일 보기 프로젝트 열기: LilTsubaki/Les-fragments-d-Erule 1 사용 예제들

공개 메소드들

메소드 설명
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