tCreate basic template for game state - hadarawgs - Hadara adaptation for boardgamearena.com
 (HTM) git clone git://git.z3bra.org/hadarawgs.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 323d8db944641f7874b03e5bb3bb198b0a863380
 (DIR) parent cdef9cfb103172d310aed8108d4f846d3801b4b1
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Thu, 27 Feb 2020 14:27:18 +0100
       
       Create basic template for game state
       
       Diffstat:
         M hadarawgs.view.php                  |      21 +++------------------
         M hadarawgs_hadarawgs.tpl             |      89 ++++++++++++++++++-------------
       
       2 files changed, 55 insertions(+), 55 deletions(-)
       ---
 (DIR) diff --git a/hadarawgs.view.php b/hadarawgs.view.php
       t@@ -38,8 +38,6 @@
                $players_nbr = count( $players );
        
                /*********** Place your code below:  ************/
       -
       -
                /*
                
                // Examples: set the value of some element defined in your tpl file like this: {MY_VARIABLE_ELEMENT}
       t@@ -55,28 +53,15 @@
                
                */
                
       -        /*
       -        
       -        // Example: display a specific HTML block for each player in this game.
       -        // (note: the block is defined in your .tpl file like this:
       -        //      <!-- BEGIN myblock --> 
       -        //          ... my HTML code ...
       -        //      <!-- END myblock --> 
       -        
       -
                $this->page->begin_block( "hadarawgs_hadarawgs", "myblock" );
                foreach( $players as $player )
                {
       -            $this->page->insert_block( "myblock", array( 
       +            $this->page->insert_block( "player", array( 
                                                            "PLAYER_NAME" => $player['player_name'],
       -                                                    "SOME_VARIABLE" => $some_value
       -                                                    ...
       +                                                    "PLAYER_ICON" => $player['player_icon']
       +                                                    "PLAYER_COLOR" => $player['player_color']
                                                             ) );
                }
       -        
       -        */
       -
       -
        
                /*********** Do not change anything below this line  ************/
                  }
 (DIR) diff --git a/hadarawgs_hadarawgs.tpl b/hadarawgs_hadarawgs.tpl
       t@@ -1,44 +1,59 @@
        {OVERALL_GAME_HEADER}
        
       -<!-- 
       ---------
       --- BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
       --- hadarawgs implementation : © Willy Goiffon <dev@z3bra.org>
       --- 
       --- This code has been produced on the BGA studio platform for use on http://boardgamearena.com.
       --- See http://en.boardgamearena.com/#!doc/Studio for more information.
       --------
       -
       -    hadarawgs_hadarawgs.tpl
       -    
       -    This is the HTML template of your game.
       -    
       -    Everything you are writing in this file will be displayed in the HTML page of your game user interface,
       -    in the "main game zone" of the screen.
       -    
       -    You can use in this template:
       -    _ variables, with the format {MY_VARIABLE_ELEMENT}.
       -    _ HTML block, with the BEGIN/END format
       -    
       -    See your "view" PHP file to check how to set variables and control blocks
       -    
       -    Please REMOVE this comment before publishing your game on BGA
       --->
       -
       -
       -This is your game interface. You can edit this HTML in your ".tpl" file.
       -
       +<div id="playerboards">
       +        <!-- BEGIN player -->
       +        <div id="playerboard_{DIR}" class="playerboard whiteblock">
       +                <div class="playername" style="color:#{PLAYER_COLOR}">{PLAYER_NAME}</div>
       +                <div class="playericon_{PLAYER_ICON}"></div>
       +                <ul class="medals-silver-container">
       +                        <li>empty</li>
       +                        <li>empty</li>
       +                </ul>
       +                <ul class="medals-gold-container">
       +                        <li>empty</li>
       +                        <li>empty</li>
       +                </ul>
       +                <ul class="resources-container">
       +                        <li>income:</li>
       +                        <li>miliraty:</li>
       +                        <li>culture:</li>
       +                        <li>food:</li>
       +                </ul>
       +                <ul class="colonies-container"></ul>
       +                <ol class="statues-container">
       +                        <li>empty</li>
       +                        <li>empty</li>
       +                        <li>empty</li>
       +                        <li>empty</li>
       +                </ol>
       +                <div class="cards-container">
       +                        <div class="cards-income-container"></div>
       +                        <div class="cards-military-container"></div>
       +                        <div class="cards-culture-container"></div>
       +                        <div class="cards-food-container"></div>
       +                        <div class="cards-science-container"></div>
       +                </div>
       +        </div>
       +        <!-- END player -->
       +</div>
       +
       +<div id="mainboard">
       +        <div class="cards-pile-container">
       +                <div class="cards-pile-income"></div>
       +                <div class="cards-discard-pile-income"></div>
       +                <div class="cards-pile-military"></div>
       +                <div class="cards-discard-pile-military"></div>
       +                <div class="cards-pile-culture"></div>
       +                <div class="cards-discard-pile-culture"></div>
       +                <div class="cards-pile-food"></div>
       +                <div class="cards-discard-pile-food"></div>
       +                <div class="cards-pile-science"></div>
       +                <div class="cards-discard-pile-science"></div>
       +        </div>
       +        <div class="cards-pile-discard"></div>
       +</div>
        
        <script type="text/javascript">
       -
       -// Javascript HTML templates
       -
       -/*
       -// Example:
       -var jstpl_some_game_item='<div class="my_game_item" id="my_game_item_${MY_ITEM_ID}"></div>';
       -
       -*/
       -
        </script>  
        
        {OVERALL_GAME_FOOTER}