I have this code in my view.php file. It puts player names onto the board:
However, after each hand ends, I clear the board and the text disappears, which is bad. It seems view.php is not run again, which has this code.
So:
1) How can I get this view.php code to run from some function call in game.php after clearing the board?
2) Or, can I put a modified version of the above code into game.php so it will insert that stuff into the page?? How would the references change?
3) Or, how in game.php can I do the equivalent of having the user press F5, which seems to rerun the view.php file?
Code: Select all
$template = self::getGameName() . "_" . self::getGameName();
// this will inflate our goDownArea block with actual players data
$this->page->begin_block($template, "goDownArea");
foreach ( $players as $player_id => $info ) {
$this->page->insert_block("goDownArea", array ("PLAYER_ID" => $player_id,
"PLAYER_NAME" => $players [$player_id] ['player_name'],
"PLAYER_COLOR" => $players [$player_id] ['player_color']
));
}
So:
1) How can I get this view.php code to run from some function call in game.php after clearing the board?
2) Or, can I put a modified version of the above code into game.php so it will insert that stuff into the page?? How would the references change?
3) Or, how in game.php can I do the equivalent of having the user press F5, which seems to rerun the view.php file?