Reversi Tutorial - player colours
Posted: 07 April 2020, 17:07
I am working my way through the reversi tutorial and have come upon a stumbling block.
After I have generated and placed the first four starting pieces I noticed they all appear as the same colour (white).
I have ensured that the following line is in place:
When i log out the colours in the addTokenOnBoard function from this.gamedatas.players[player].color I recieve the following two values (008000 and FF0000) (green and red). therefore this does not match up with the classes created in the .css file and the correct portion of the image is never shown.
Has anyone else come across this, or have any suggestions for what is going wrong.
Cheers,
Darren
After I have generated and placed the first four starting pieces I noticed they all appear as the same colour (white).
I have ensured that the following line is in place:
Code: Select all
$default_colors = array("ffffff", "000000");Has anyone else come across this, or have any suggestions for what is going wrong.
Cheers,
Darren