C# 클래스 HearthAnalyzer.Core.Cards.Deck

Represents a deck of cards
파일 보기 프로젝트 열기: kwluo90/HearthAnalyzer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Cards List

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
AddCard ( BaseCard card ) : void

Adds a card to the current deck

Adds to the end of the deck by default

AddCards ( IEnumerable cards ) : void

Adds a list of cards to the current deck

Adds to the end of the deck by default

Deck ( ) : System

Initialize a new empty deck

Deck ( List cards ) : System

Initialize a deck with a list of cards

DrawCard ( ) : BaseCard

Draws a card from the player's deck

DrawCards ( int n = 1 ) : List

Draws n cards

FromDeckFile ( string pathToFile ) : Deck

Creates a deck from a deck file

A deck file follows the following format: [count], [card name] with each card on a separate line

Shuffle ( int n = 5 ) : void

Shuffle the deck

메소드 상세

AddCard() 공개 메소드

Adds a card to the current deck
Adds to the end of the deck by default
public AddCard ( BaseCard card ) : void
card BaseCard The card to add
리턴 void

AddCards() 공개 메소드

Adds a list of cards to the current deck
Adds to the end of the deck by default
public AddCards ( IEnumerable cards ) : void
cards IEnumerable The list of cards to add
리턴 void

Deck() 공개 메소드

Initialize a new empty deck
public Deck ( ) : System
리턴 System

Deck() 공개 메소드

Initialize a deck with a list of cards
public Deck ( List cards ) : System
cards List The cards to fill the deck with
리턴 System

DrawCard() 공개 메소드

Draws a card from the player's deck
public DrawCard ( ) : BaseCard
리턴 BaseCard

DrawCards() 공개 메소드

Draws n cards
public DrawCards ( int n = 1 ) : List
n int The number of cards to draw
리턴 List

FromDeckFile() 공개 정적인 메소드

Creates a deck from a deck file
A deck file follows the following format: [count], [card name] with each card on a separate line
public static FromDeckFile ( string pathToFile ) : Deck
pathToFile string Path to the deck file
리턴 Deck

Shuffle() 공개 메소드

Shuffle the deck
public Shuffle ( int n = 5 ) : void
n int The number of times to shuffle the deck
리턴 void

프로퍼티 상세

Cards 공개적으로 프로퍼티

public List Cards
리턴 List