C# 클래스 HearthAnalyzer.Core.GameEngine

Represents the game engine and game loop for Hearthstone
파일 보기 프로젝트 열기: kwluo90/HearthAnalyzer

공개 프로퍼티들

프로퍼티 타입 설명
GameEnded GameEndedEventHandler

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
ApplyAttackDamage ( IAttacker attacker, IDamageableEntity target, bool isRetaliation = false ) : void

Apply damage from the attacker to the target

CheckForGameEnd ( ) : bool

Checks to see if the game has ended

DealPreMulligan ( ) : void

Shuffles and deals the pre-mulligan hands

EndTurn ( ) : void

Ends the turn for the current player

Initialize ( BasePlayer player, BasePlayer opponent, GameBoard board = null, int turnNumber, BasePlayer currentPlayer = null, int randomSeed ) : void

Initialize the game engine

MoveCard ( int id, Zones srcZone, int srcPos, Zones destZone, int destPos ) : void

Moves a card from one zone position to another zone position

Mulligan ( BasePlayer player, IEnumerable mulligans ) : void

Performs a mulligan for the specified player

RegisterDeathrattle ( BaseCard source, BaseDeathrattle baseDeathrattle ) : void

Register a baseDeathrattle with the game engine. If the source card dies, it will trigger.

StartTurn ( BasePlayer player ) : void

Starts a turn for the specified player

TriggerDeathrattles ( ) : void

Triggers death rattles after damage has been calculated.

Uninitialize ( ) : void

Uninitializes the game engine

UnregisterDeathrattle ( BaseMinion source ) : void

Removes all deathrattles registered by the source card.

메소드 상세

ApplyAttackDamage() 공개 정적인 메소드

Apply damage from the attacker to the target
public static ApplyAttackDamage ( IAttacker attacker, IDamageableEntity target, bool isRetaliation = false ) : void
attacker IAttacker The card doing the attacking
target IDamageableEntity The object receiving the attack
isRetaliation bool Whether or not the attack is a retaliation
리턴 void

CheckForGameEnd() 공개 정적인 메소드

Checks to see if the game has ended
public static CheckForGameEnd ( ) : bool
리턴 bool

DealPreMulligan() 공개 정적인 메소드

Shuffles and deals the pre-mulligan hands
public static DealPreMulligan ( ) : void
리턴 void

EndTurn() 공개 정적인 메소드

Ends the turn for the current player
public static EndTurn ( ) : void
리턴 void

Initialize() 공개 정적인 메소드

Initialize the game engine
public static Initialize ( BasePlayer player, BasePlayer opponent, GameBoard board = null, int turnNumber, BasePlayer currentPlayer = null, int randomSeed ) : void
player BasePlayer Player 1
opponent BasePlayer Player 2 (the opponent)
board GameBoard The current game board
turnNumber int The current turn number
currentPlayer BasePlayer The current player
randomSeed int The random seed to use
리턴 void

MoveCard() 공개 정적인 메소드

Moves a card from one zone position to another zone position
public static MoveCard ( int id, Zones srcZone, int srcPos, Zones destZone, int destPos ) : void
id int The card to move
srcZone Zones The source zone
srcPos int The source position
destZone Zones The destination zone
destPos int The destination position
리턴 void

Mulligan() 공개 정적인 메소드

Performs a mulligan for the specified player
public static Mulligan ( BasePlayer player, IEnumerable mulligans ) : void
player BasePlayer The player performing the mulligan
mulligans IEnumerable The cards to toss if any
리턴 void

RegisterDeathrattle() 공개 정적인 메소드

Register a baseDeathrattle with the game engine. If the source card dies, it will trigger.
public static RegisterDeathrattle ( BaseCard source, BaseDeathrattle baseDeathrattle ) : void
source BaseCard The triggering card
baseDeathrattle HearthAnalyzer.Core.Deathrattles.BaseDeathrattle The baseDeathrattle to perform
리턴 void

StartTurn() 공개 정적인 메소드

Starts a turn for the specified player
public static StartTurn ( BasePlayer player ) : void
player BasePlayer The player who is starting their turn
리턴 void

TriggerDeathrattles() 공개 정적인 메소드

Triggers death rattles after damage has been calculated.
public static TriggerDeathrattles ( ) : void
리턴 void

Uninitialize() 공개 정적인 메소드

Uninitializes the game engine
public static Uninitialize ( ) : void
리턴 void

UnregisterDeathrattle() 공개 정적인 메소드

Removes all deathrattles registered by the source card.
public static UnregisterDeathrattle ( BaseMinion source ) : void
source HearthAnalyzer.Core.Cards.BaseMinion The triggering card
리턴 void

프로퍼티 상세

GameEnded 공개적으로 정적으로 프로퍼티

The event that gets fired when the game is over
public static GameEndedEventHandler GameEnded
리턴 GameEndedEventHandler