Created
November 12, 2014 14:09
-
-
Save JuanLuisGarciaBorrego/94aad460a2bf6654118d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#OptimizacionMegaDriveDI.php | |
//Objectos juegos disponibles | |
$Fifa = new Fifa(); | |
$Sonic = new Sonic('nivelFacil'); | |
//Una sola instancia de MegaDrive | |
$JugarMegaDrive = new MegaDrive(); | |
//Empiezo jugando al Fifa | |
$jugarMegaDrive->jugar($Fifa); | |
//A los 30 minutos cambio al juego Sonic | |
$jugarMegaDrive->jugar($Sonic); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment