I'm working on a game where each player has their own board. Does anyone have an example handy of how to set up the view so that each player sees their own board at the top? Games like Potion Explosion and 7 Wonders do this.
I'm not sure if there's a way to do this in view.php, or if I should just use javascript to bring the appropriate board into place after the game loads. Doing it on the PHP side seems preferable. Right now my approach is to pull out the current player id from the player list array, set up their board, then loop through the remaining players after the current player is set up.
I've put together a crude illustration of the layout I'm going for, where the top div contains the player area consisting of their personal board (blue rectangle) and shared board (purple rectangle, same for everyone), and the bottom div has smaller versions of each of the opponents' player boards.
I'm not sure if there's a way to do this in view.php, or if I should just use javascript to bring the appropriate board into place after the game loads. Doing it on the PHP side seems preferable. Right now my approach is to pull out the current player id from the player list array, set up their board, then loop through the remaining players after the current player is set up.
I've put together a crude illustration of the layout I'm going for, where the top div contains the player area consisting of their personal board (blue rectangle) and shared board (purple rectangle, same for everyone), and the bottom div has smaller versions of each of the opponents' player boards.