This file contains hidden or 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
// variable de control de loop while | |
bool run = true; | |
// ==== EMPIEZA EL LOOP() ==== | |
void loop (){ | |
// Loop de control | |
while(run == true){ | |
if(eleccionJugador == eleccionArduino){ | |
Serial.print("Empate! "+String(eleccionJugador)+" no gana a "+String(eleccionArduino)); |
This file contains hidden or 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
// Resolución en caso de empate. | |
if(eleccionJugador == eleccionArduino){ | |
Serial.print("Empate! "+String(eleccionJugador)+" no gana a "+String(eleccionArduino)); | |
} |
This file contains hidden or 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
// Definimos la eleccion del jugador y Arduino a cero. | |
String eleccionArduino = "vacio"; | |
// ==== EMPIEZA EL LOOP() ==== | |
void loop (){ | |
// === ELECCIÓN ARDUINO === | |
// la elección de Arduino es un numero al azar entre 1 y 5. |
This file contains hidden or 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
// Definimos la eleccion del jugador y Arduino a cero. | |
String eleccionJugador = "vacio"; | |
// ==== EMPIEZA EL LOOP() ==== | |
void loop (){ | |
// El jugador define su elección a traves de los 5 botones. | |
if(digitalRead(boton1) == HIGH){ | |
eleccionJugador = "piedra"; | |
}else if(digitalRead(boton2) == HIGH){ |
This file contains hidden or 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
// ==== Definiendo los Botones ==== | |
// botones | |
int boton1 = 12; | |
int boton2 = 11; | |
int boton3 = 10; | |
int boton4 = 9; | |
int boton5 = 8; | |
This file contains hidden or 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
// Si el jugador es piedra | |
}else if( eleccionJugador == "piedra") { | |
// Piedra gana a tijeras. | |
if (eleccionArduino == "tijeras"){ | |
Serial.print("Jugador Gana! ...piedra aplasta las tijeras"); | |
// Piedra gana a lagarto. | |
}else if( eleccionArduino == "lagarto"){ | |
Serial.print("Jugador Gana! ...piedra aplasta al lagarto"); |
This file contains hidden or 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
.factory( 'DBService', [ '$FirebaseArray', function ($FirebaseArray) { | |
var oFB_DB = new Firebase('https://<<FIREBASE-URL>>.firebaseio.com'); | |
return { | |
getAlumnos: { function (){} | |
return $firebaseArray(oFB_DB); | |
} | |
}; | |
}]); |
This file contains hidden or 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
function FactoriaVehiculos() { | |
this.createVehicle = function (type) { | |
var vehicle; | |
if (type === "coche") { | |
vehicle = new Coche(); | |
} else if (type === "moto") { | |
vehicle = new Moto(); | |
} else if (type === "autobus") { | |
vehicle = new Autobus(); |
This file contains hidden or 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 | |
if ( post_password_required() ) | |
return; | |
?> | |
<div id="comments" class="comments-area"> | |
<?php if ( comments_open() && get_comments_number() ): ?> |
This file contains hidden or 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
<form action="" method="POST"> | |
<p> | |
<label for="email"><?php _e( 'Email', 'ignacio' ); ?> | |
<input id="email" type="email" name="email" value="" /> | |
</label> | |
</p> | |
<p> | |
<label for="message"><?php _e( 'Message', 'ignacio' ); ?></label> | |
<textarea id="message" name="message"></textarea> | |
</p> |