#include #include #include #include #include #include #include #include struct translation { char lang[10]; char rock[20]; char rock2[20]; char scissors[20]; char scissors2[20]; char paper[20]; char paper2[20]; }; #define LANGS 9 struct translation dictionary[LANGS] = { { "cs", "Kamen", "", "Nuzky", "", "Papir", ""}, { "en", "Rock", "", "Scissors", "", "Paper", ""}, { "fr", "Pierre", "", "Ciseaux", "", "Feuille", ""}, { "de", "Stein", "", "Schere", "", "Papier", ""}, { "hu", "Ko", "Koe", "Ollo", "Olloo", "Papir", ""}, { "it", "Sasso", "Roccia","Forbice", "", "Carta", "Rete"}, { "jp", "Guu", "", "Choki", "", "Paa", ""}, { "pl", "Kamien", "", "Nozyce", "", "Papier", ""}, { "es", "Piedra", "", "Tijera", "", "Papel", ""} }; int translate(char *lang, char *word) { int i; for (i=0; i 1) printf("\n"); printf("Game #%i:\n", gamen); gamen++; printf("%s: %i point%s\n", name1, points1, points1 == 1 ? "":"s"); printf("%s: %i point%s\n", name2, points2, points2 == 1 ? "":"s"); if (points1 == points2) printf("TIED GAME\n"); else if (points1 > points2) printf("WINNER: %s\n", name1); else if (points1 < points2) printf("WINNER: %s\n", name2); if (word1[0] == '.') break; } return 0; }