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
#! /bin/zsh | |
# if you use bash, change /bin/zsh to /bin/bash | |
if [ "$1" = "-h" ]; then | |
echo "To use correctly this script, execute: | |
[arg1 = folder name] [arg2 = repo/github/url] | |
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
import os | |
# Se introduce la ruta para la creacion del diccionario por teclado | |
route = input("Introduce la ruta donde se creará el diccionario:") | |
# la funcion open acepta la ruta donde se va a crear el archivo | |
# y la W otorga permisos de escritura | |
file = open(route+"/dictionary.txt", "w") | |
# la funcion write rellena el contenido del archivo dictinary.txt |
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
import java.util.*; | |
public class Coc { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String tropa, hecho; | |
int total, cantidad; | |
String[] tropas = {"Barbaro","Arquera","Gigante","Mago","Dragón","Pekka","Esqueleto","Goblin","Globo","Sanadora"}; | |
int[] costes = {200,400,3000,3500,33000,36000,3000,100,3500,10000}; |