Class Goldtip

Description

Represents the game GOLDtip

  • author: Libor Tichy

Located in /World/GoldtipModel.php (line 15)

NObject
   |
   --Goldtip
Variable Summary
static array $pools
Method Summary
Goldtip __construct ([int $gameId = null])
void cancle ()
void create (int $characterId, int $pool)
void execute ()
array generateHeaps (int $pool)
int getHeap (int $number)
mixed getPlayerOneTip (int $number)
mixed getPlayerTwoTip (int $number)
mixed getTips (int $playerId, [int $number = null])
boolean isOpen ()
boolean isReady ()
void join (int $playerId)
void save ()
void setHeaps (array $heaps)
void setPlayerOneTips (array $tips)
void setPlayerTwoTips (array $tips)
playerTwoTips setTips (int $playerId, array $tips)
string status ()
mixed &__get (string $item)
Variables
static array $pools = array(
'250' => 250,
'500' => 500,
'1000' => 1000,
'2500' => 2500,
'5000' => 5000,
'10000' => 10000
)
(line 44)
  • access: public
Methods
Constructor __construct (line 58)

Goldtip constructor.

  • throws: Exception
  • access: public
Goldtip __construct ([int $gameId = null])
  • int $gameId: game id
cancle (line 370)

Cancel this game.

  • throws: Exception
  • access: public
void cancle ()
create (line 423)

Create new game whith parameters.

  • throws: Exception
  • access: public
void create (int $characterId, int $pool)
  • int $characterId: character id
  • int $pool: pool size
execute (line 317)

Executes the current game.

  • throws: Exception
  • access: public
void execute ()
generateHeaps (line 400)

Generate three heaps.

  • access: public
array generateHeaps (int $pool)
  • int $pool: pool size
getHeap (line 205)

Get heap of the heaps specified by $number.

  • throws: Exception
  • access: public
int getHeap (int $number)
  • int $number: number of the heap
getPlayerOneTip (line 176)

Get tips for player one.

  • throws: Exception
  • access: public
mixed getPlayerOneTip (int $number)
  • int $number: number of the tip
getPlayerTwoTip (line 160)

Get tips for player two.

  • throws: Exception
  • access: public
mixed getPlayerTwoTip (int $number)
  • int $number: number of the tip
getTips (line 128)

Get tips.

  • access: public
mixed getTips (int $playerId, [int $number = null])
  • int $playerId: character id
  • int $number: number of the tip
isOpen (line 361)

If the game has only one player and is waiting for other.

  • access: public
boolean isOpen ()
isReady (line 302)

If game is ready to by executed.

  • access: public
boolean isReady ()
join (line 385)

Make the character playing the open game.

  • throws: Exception
  • access: public
void join (int $playerId)
  • int $playerId: character id
save (line 220)

Save current game to database.

  • throws: Exception
  • access: public
void save ()
savePlayerOneTips (line 255)

Save current player one tips.

  • throws: Exception
  • access: public
void savePlayerOneTips ()
savePlayerTwoTips (line 278)

Save current player two tips.

  • throws: Exception
  • access: public
void savePlayerTwoTips ()
setHeaps (line 192)

Set heaps for this game.

  • throws: Exception
  • access: public
void setHeaps (array $heaps)
  • array $heaps: heaps
setPlayerOneTips (line 103)

Set tips for player one.

  • throws: Exception
  • access: public
void setPlayerOneTips (array $tips)
  • array $tips: tips
setPlayerTwoTips (line 115)

Set tips for player two.

  • throws: Exception
  • access: public
void setPlayerTwoTips (array $tips)
  • array $tips: tips
setTips (line 147)

Sets tips for player.

  • access: public
playerTwoTips setTips (int $playerId, array $tips)
  • int $playerId: character id
  • array $tips: player tips
status (line 442)

Get the status of the game.

  • access: public
string status ()
__get (line 456)

Returns user data value.

  • access: public
mixed &__get (string $item)
  • string $item: property name

Documentation generated on Tue, 07 Jun 2011 20:47:28 +0200 by phpDocumentor 1.4.3