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
var n=12; | |
var resultado=0; | |
function check (n){ | |
if (n%2 ==0){ | |
i=0;i<=20;i++; | |
resultado= resultado+i; | |
console.log(resultado); | |
} | |
else{ |
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
var a1 = [0,0,0] | |
var a2 = [0,0,0] | |
var a3 = [0,0,0] | |
var tablero = [a1,a2,a3] | |
function introPieza (jugador, x,y){ | |
si tablero[x][y] == 0 | |
tablero[x][y]== jugador // si la casilla es 0, esta libre, el jugador n puede poner la casilla | |
devuelve verdadero // cuando es valida la accion, cambia de jugador. si devuelve falso sigue jugando el mismo |
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
var a1 = [0,0,0] | |
var a2 = [0,0,0] | |
var a3 = [0,0,0] | |
var tablero = [a1,a2,a3] | |
var terminado = false; | |
tablero [0][1]; | |
function comprobarTablero (pos) { | |
si tablero [pos] es false -> { |