<?php /** * Copyright 2015 * Unauthorized use of the contents of this site without the prior written consent is forbidden. */ require 'classes/Warrior.php'; require 'classes/Arena.php'; $warriors = array(0 => array('strenght' => 50, 'stamina' => 300, 'luck' => 10, 'arrmor' => 31, 'acrobatics' => 15, 'name' => 'Orc'), 1 => array('strenght' => 40, 'stamina' => 223, 'luck' => 25, 'arrmor' => 22, 'acrobatics' => 60, 'name' => 'Hobit')); echo '<pre>'; print_r($warriors); echo '</pre><hr>'; $warrior1 = new Warrior($warriors[0], $warriors[0]['name']); $warrior2 = new Warrior($warriors[1], $warriors[1]['name']); $arena = new Arena($warrior1, $warrior2); $arena->startFight(); foreach ($arena->getFightLog() as $logLine) { echo $logLine; } echo '<h1><font color="lime">Fight win ' . $arena->getWinner()->getName() . '</font></h1>';