Ejemplo n.º 1
0
    }
    function display()
    {
        if ($this->jump == true) {
            $say = '<p>
                <strong>The ball was delivered ' . $this->arm . ' handed by ' . $this->name . ' with great skill!</strong>
            </p>';
        } else {
            if ($this->jump == false) {
                $say = '<p>
                <strong>The ball was delivered ' . $this->arm . ' handed by ' . $this->name . ' with little skill!</strong>
            </p>';
            }
        }
        return $say . '
            <p>
                Skill One ' . $this->speed . ' / ' . $this->skill1 . '
            </p>
            <p>
                Skill Two ' . $this->jump . ' / ' . $this->skill2 . '
            </p>';
    }
}
#############################
#############################
##USAGE Example
#############################
#############################
$bowler = new action();
$bowler->set('Steven Finn', 'r', rand(0, 100), rand(0, 100));
echo $bowler->display();