Goldtip constructor.
Goldtip
__construct
([int $gameId = null])
Cancel this game.
void
cancle
()
Create new game whith parameters.
void
create
(int $characterId, int $pool)
-
int
$characterId: character id
-
int
$pool: pool size
Executes the current game.
void
execute
()
Generate three heaps.
array
generateHeaps
(int $pool)
Get heap of the heaps specified by $number.
int
getHeap
(int $number)
-
int
$number: number of the heap
Get tips for player one.
mixed
getPlayerOneTip
(int $number)
-
int
$number: number of the tip
Get tips for player two.
mixed
getPlayerTwoTip
(int $number)
-
int
$number: number of the tip
Get tips.
mixed
getTips
(int $playerId, [int $number = null])
-
int
$playerId: character id
-
int
$number: number of the tip
If the game has only one player and is waiting for other.
boolean
isOpen
()
If game is ready to by executed.
boolean
isReady
()
Make the character playing the open game.
void
join
(int $playerId)
-
int
$playerId: character id
Save current game to database.
void
save
()
Save current player one tips.
void
savePlayerOneTips
()
Save current player two tips.
void
savePlayerTwoTips
()
Set heaps for this game.
void
setHeaps
(array $heaps)
Set tips for player one.
void
setPlayerOneTips
(array $tips)
Set tips for player two.
void
setPlayerTwoTips
(array $tips)
Sets tips for player.
playerTwoTips
setTips
(int $playerId, array $tips)
-
int
$playerId: character id
-
array
$tips: player tips
Get the status of the game.
string
status
()
Returns user data value.
mixed
&__get
(string $item)
-
string
$item: property name