bashmaze.sh

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
bashmaze.sh [2024/06/11 22:47] peronbashmaze.sh [2024/06/11 22:55] (actual) peron
Línea 32: Línea 32:
  Bash Maze ver 1.0  Bash Maze ver 1.0
 ******************************************* *******************************************
-Help the red ball find the exit+Ayuda a la bola roja a encontrar la salida
 ******************************************* *******************************************
-Keys+Teclas
- a -> move left + a -> Izquierda 
- s -> move down + s -> Abajo 
- d -> move right + d -> Derecha 
- w -> move up + w -> Arriba 
- q -> quit (anytime)+ q -> Salir (en cualquier momento)
 ******************************************* *******************************************
 EOF EOF
Línea 45: Línea 45:
 echo -e '\033[01;31m' echo -e '\033[01;31m'
 cat << EOF cat << EOF
-Select the difficulty+Seleccione dificultad
- 1-) Easy + 1-) Fácil 
- 2-) Medium + 2-) Medio 
- 3-) Hard + 3-) Difícil 
- q-) Exit+ q-) Salir
 EOF EOF
 tput sgr0 tput sgr0
Línea 149: Línea 149:
  
 # Variables # Variables
-INPUT="0"Input data+INPUT="0"Data de entrada
 m="0" # Mov 1 m="0" # Mov 1
 n="1" # Mov 2 n="1" # Mov 2
-C="0"Collision test +C="0"Prueba colisión 
-x="3" # X coordinate +x="3"coord 
-y="0" # Y coordinate +y="0"coord 
-counter="1" #Counts movements+counter="1" #Contador movimiento
 WINS="$(echo $MAZE_HEIGHT - 3 | bc)" # Detects the exit WINS="$(echo $MAZE_HEIGHT - 3 | bc)" # Detects the exit
  
Línea 163: Línea 163:
   cat $TMP/maze.txt   cat $TMP/maze.txt
   tput sgr0   tput sgr0
-  echo "coordinate = $x" +  echo "Coordinada X = $x" 
-  echo "coordinate = $y" +  echo "Coordinada Y = $y" 
-  echo "Moves = $counter"+  echo "Movidas = $counter"
 } }
  
Línea 234: Línea 234:
     tput cup $(echo $MAZE_HEIGHT + 3 | bc) 0     tput cup $(echo $MAZE_HEIGHT + 3 | bc) 0
     echo -e '\033[01;31m'     echo -e '\033[01;31m'
-    echo You WON!!!!! +    echo GANASTE!!!!! 
-    echo "Score: $counter moves"+    echo "Puntaje: $counter movidas"
     tput sgr0     tput sgr0
     echo      echo 
  • bashmaze.sh.txt
  • Última modificación: 2024/06/11 22:55
  • por peron