This is a documentation for Board Game Arena: play board games online !

Game material description: material.inc.php

Innen: Board Game Arena
A lap korábbi változatát látod, amilyen Sourisdudesert (vitalap | szerkesztései) 2013. január 11., 16:18-kor történt szerkesztése után volt. (Created page with "This PHP file describes all the material of your game. This file is include by the constructor of your main game logic (yourgame.game.php), and then the variables defined her...")
(eltér) ← Régebbi változat | Aktuális változat (eltér) | Újabb változat→ (eltér)
Ugrás a navigációhoz Ugrás a kereséshez

This PHP file describes all the material of your game.

This file is include by the constructor of your main game logic (yourgame.game.php), and then the variables defined here are accessible everywhere in your game logic file.

Example from "Hearts": if you define this in material.inc.php:

$this->colors = array(
    1 => array( 'name' => clienttranslate('spade'),
                'nametr' => self::_('spade') ),
    2 => array( 'name' => clienttranslate('heart'),
                'nametr' => self::_('heart') ),
    3 => array( 'name' => clienttranslate('club'),
                'nametr' => self::_('club') ),
    4 => array( 'name' => clienttranslate('diamond'),
                'nametr' => self::_('diamond') )
);

... you can access "$this->colors" everywhere in your PHP game logic file.