Difference between revisions of "Player Functions"
From theFarWilds
(New page: Scripting Player Functions are called on the Player object. For example Player player=getAIPlayer(0); player.drawCard(); List of functions: bool isValid(); void addToHand(string ...) |
(→Constructors) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | [[ | + | [[Category:Scripts]] |
− | + | Each '''player object''' represents a human or ai player. | |
− | Player | + | == Constructors == |
− | + | Player '''getAIPlayer'''( int index ); | |
+ | |||
+ | Player '''getHumanPlayer'''( int index ); | ||
+ | |||
+ | Player '''getPlayer'''( int index ); | ||
− | + | == Methods == | |
− | bool isValid(); | + | bool '''isValid'''(); |
− | void addToHand(string cardName) | + | |
− | void addToDeck(string cardName,int index) | + | bool '''isHuman'''(); |
− | Card getDeckCard(int index) | + | |
− | Card getHandCard(int index) | + | void '''addToHand'''( string cardName ); |
− | void removeHandCard(int index) | + | |
− | void removeDeckCard(int index) | + | void '''addToDeck'''( string cardName, int index ); |
− | void drawCard() | + | |
− | int deckSize() | + | Card '''getDeckCard'''( int index ); |
− | int handSize() | + | |
− | void addFlux(int delta) | + | Card '''getHandCard'''( int index ); |
− | void addGlory(int delta) | + | |
− | int getFlux() | + | void '''removeHandCard'''( int index ); |
− | int getGlory() | + | |
+ | void '''removeDeckCard'''( int index ); | ||
+ | |||
+ | void '''drawCard'''(); | ||
+ | |||
+ | void '''shuffleDeck'''(); | ||
+ | |||
+ | int '''deckSize'''(); | ||
+ | |||
+ | int '''handSize'''(); | ||
+ | |||
+ | void '''addFlux'''( int delta ); | ||
+ | |||
+ | void '''addGlory'''( int delta ); | ||
+ | |||
+ | int '''getFlux'''(); | ||
+ | |||
+ | int '''getGlory'''(); | ||
+ | |||
+ | void '''setTeam'''( int teamId ); | ||
+ | // set to zero for no team |
Latest revision as of 02:05, 13 April 2010
Each player object represents a human or ai player.
Constructors
Player getAIPlayer( int index ); Player getHumanPlayer( int index ); Player getPlayer( int index );
Methods
bool isValid(); bool isHuman(); void addToHand( string cardName ); void addToDeck( string cardName, int index ); Card getDeckCard( int index ); Card getHandCard( int index ); void removeHandCard( int index ); void removeDeckCard( int index ); void drawCard(); void shuffleDeck(); int deckSize(); int handSize(); void addFlux( int delta ); void addGlory( int delta ); int getFlux(); int getGlory(); void setTeam( int teamId ); // set to zero for no team