Hi all,
Would like to clarify the meaning of the variables in the Javascript method for placeOnObject. I will be using the scripts example from reversi.
I assume the first value 'disc_'+x+''+y is the id of the disc that to be place on the board in define in both the tpl file and created via the dojo.place method within the addDiscOnBoard. Do correct me if I am wrong.
The second variable 'overall_player_board_'+player, however, I do not understand where this 'overall_player_board_' had been define. in the tpl file and css file, the reversi board was name 'board'.
With regards to this script for my own project, if I am adding tokens on board that is a part of the setup and these tokens do not belong to any player, what should I state as the second variable for this.placeOnObject?
Would like to clarify the meaning of the variables in the Javascript method for placeOnObject. I will be using the scripts example from reversi.
Code: Select all
this.placeOnObject( 'disc_'+x+''+y, 'overall_player_board_'+player );
The second variable 'overall_player_board_'+player, however, I do not understand where this 'overall_player_board_' had been define. in the tpl file and css file, the reversi board was name 'board'.
With regards to this script for my own project, if I am adding tokens on board that is a part of the setup and these tokens do not belong to any player, what should I state as the second variable for this.placeOnObject?