Hi all,
Pardon me as I am new to BGA developer and still quite amateurish to PHP coding.
The default code of mygame.game.php has a few line of codes (from line 61 to line 78) that populate some basic information such as player color and if any favorite color among players.
However, this are some difficulties that I met in the default codes as part of project creation:
1. $gameinfos = self::getGameinfos(); in line 64
This segment cannot function as there were no such method stated anywhere. If we need to program our own, what should be added here?
2. $default_colors = $gameinfos['player_colors']; in line 65
I see 2 possbilities in this statement. One would be defining the information in getGameInfos() in line 64. The other would be using $gameinfos array stated in the gameinfos.inc.php.
However, I tried importing the gameinfos.inc.php in the header of mygame.game.php file like this:
include 'gameinfos.inc.php';
I added this line after the require_once stated at the start of the file.
But the setup still could not find $gameinfos array and reported an error that the values were null.
Could someone please enlighten me?
Regards,
Chris (Cowseye)
Pardon me as I am new to BGA developer and still quite amateurish to PHP coding.
The default code of mygame.game.php has a few line of codes (from line 61 to line 78) that populate some basic information such as player color and if any favorite color among players.
However, this are some difficulties that I met in the default codes as part of project creation:
1. $gameinfos = self::getGameinfos(); in line 64
This segment cannot function as there were no such method stated anywhere. If we need to program our own, what should be added here?
2. $default_colors = $gameinfos['player_colors']; in line 65
I see 2 possbilities in this statement. One would be defining the information in getGameInfos() in line 64. The other would be using $gameinfos array stated in the gameinfos.inc.php.
However, I tried importing the gameinfos.inc.php in the header of mygame.game.php file like this:
include 'gameinfos.inc.php';
I added this line after the require_once stated at the start of the file.
But the setup still could not find $gameinfos array and reported an error that the values were null.
Could someone please enlighten me?
Regards,
Chris (Cowseye)