Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- class MainClass
- {
- static string piege = "";
- public static void Main (string[] args) {
- var inventaire = new List<string>() { "" };
- string all_DeTrapeur = "";
- string element_detrapeur = "";
- for (int i = 0; i < inventaire.Count; i++)
- {
- if (inventaire[i].Contains(all_DeTrapeur))
- element_detrapeur = inventaire[i];
- }
- int score = 0;
- bool mort = false;
- string englais_gauche = "left";
- string englais_droite = "right";
- string englais_avant = "forward";
- bool anticheater = false;
- string repcinematique;
- bool cinematique = true;
- string[] anticheat = new string[3]
- { "gauche", "droite", "avant" };
- string result1 = string.Join(",", anticheat[0]);
- string result2 = string.Join(",", anticheat[1]);
- string result3 = string.Join(",", anticheat[2]);
- //Introduction
- Console.WriteLine("The Maze V2\n");
- System.Threading.Thread.Sleep(400);
- Console.WriteLine("Loading...");
- System.Threading.Thread.Sleep(4000);
- Console.WriteLine("\n\n\nChoisissez votre language / Choose your language: En/Fr");
- Console.WriteLine("");
- string choix_language = Convert.ToString(Console.ReadLine());
- if (choix_language == "fr")
- {
- Console.WriteLine("\nNouveaux ajouts : \n -Choix du language entre Francais et Anglais\n -Nouveau Système De Boutique!\n -Nouveau Sytème D'inventaire!\n -Nouvelle Item Ajouté a La Boutique!\n\nProchainement : \n -De Nouveaux Items!\n -De Meilleurs Optimisations et Beaucoup de Nouveaux Bugs Seront Fixés");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Appuyez sur entrer pour continuer.");
- Console.ReadLine();
- }
- else if (choix_language == "en")
- {
- Console.WriteLine("\nNew additions: : \n -Choice of language between French and English\n -New Shop System!\n -New Inventory System!\n -New Item In The Shop!\nComing soon : \n -New Items! \n");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Appuyez sur entrer pour continuer.");
- Console.ReadLine();
- }
- if (choix_language == "fr")
- {
- Console.WriteLine("Souhaitez-vous passer le tutoriel? (O/N)");
- repcinematique = Console.ReadLine();
- if (repcinematique == "o")
- {
- cinematique = false;
- }
- }
- else if (choix_language == "en")
- {
- Console.WriteLine("Would you like to pass the tutorial? (Y/N)");
- repcinematique = Console.ReadLine();
- if (repcinematique == "y")
- {
- cinematique = false;
- }
- }
- if (cinematique == true)
- {
- if (choix_language == "fr")
- {
- Console.WriteLine("Bonjour et bienvenue dans le labyrinthe.");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Appuyez sur entrer pour continuer.");
- Console.ReadLine();
- Console.WriteLine("Dans celui-ci, vous devrez vous rendre le plus loin possible sans faire face aux pièges !");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Appuyez sur entrer pour continuer.");
- Console.ReadLine();
- Console.WriteLine("Vous aurez 1 chance sur 3 de tomber sur un piège à chaque chemins que vous prenez.");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Appuyez sur entrer pour commencer.");
- Console.ReadLine();
- }
- else if (choix_language == "en")
- {
- Console.WriteLine("Welcome to the maze.");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Press enter to continue.");
- Console.ReadLine();
- Console.WriteLine("In this maze you’ll have to get the fartest without dying to the traps!");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Press enter to continue.");
- Console.ReadLine();
- Console.WriteLine("You only have 1 life so be careful!");
- System.Threading.Thread.Sleep(1500);
- Console.WriteLine("");
- }
- }
- //Script Jeu
- if (choix_language == "fr")
- {
- if (cinematique == true)
- {
- Console.WriteLine("\nVous vous réveillez dans un ascenseur en marche.");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Appuyez sur entrer pour commencer.");
- Console.ReadLine();
- Console.WriteLine("La porte s'ouvre et vous vous retrouvez dans une grande salle. Celle-ci est dotée de trois grand couloirs, un a gauche, un a droite et un tout-droit.");
- System.Threading.Thread.Sleep(6000);
- Console.WriteLine("");
- Console.WriteLine("Faites attention ! L'un des trois chemins peut contenir un piège.");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("");
- System.Threading.Thread.Sleep(2000);
- }
- }
- else if (choix_language == "en")
- {
- if (cinematique == true)
- {
- Console.WriteLine("\nYou just woke up in a working elevator.");
- Console.WriteLine("");
- Console.WriteLine("");
- Console.WriteLine("Press enter to continue.");
- Console.ReadLine();
- Console.WriteLine("The door opens and you walk in a giant room. It has multiple ways: right, left and forward.");
- System.Threading.Thread.Sleep(2500);
- Console.WriteLine("Some paths might be gathered with traps...");
- Console.WriteLine("");
- Console.WriteLine("");
- }
- result1 = englais_gauche;
- result2 = englais_droite;
- result3 = englais_avant;
- Console.WriteLine("(enter left, to go left, right, to go right, or forward, to go forward.");
- }
- bool menu = true;
- int prix_detrapeur = 20;
- int argent = 0;
- string choix_menu_fr = "";
- string choix_menu_en = "";
- string choix_chemin = "";
- while (mort == false)
- {
- //Gestion Menu
- while (menu == true)
- {
- if (choix_language == "fr")
- {
- Console.WriteLine("\n\n---------------------------------------------------------------------\n\n Argent : " + argent + "$" + "\n Points : " + score + "\n\n----------------------------------------------------\n-Boutique (tape 'boutique' puis Entre)\n----------------------------------------------------\n-Revendre tes points pour gagner de l'argent (tape 'revente' puis Entre)\n----------------------------------------------------\n-Inventaire (tape 'inv' puis Entre)\n----------------------------------------------------\n\n -Tape 'continuer' puis Entre pour débuter le jeu");
- choix_menu_fr = Convert.ToString(Console.ReadLine());
- }
- else if (choix_language == "en")
- {
- Console.WriteLine("\n\n---------------------------------------------------------------------\n\n Money:" + argent + "$" + "\n Points : " + score + " points" + "\n\n----------------------------------------------------\n-Shop (type 'shop' then Enter)\n----------------------------------------------------\n-Resell your accumulated points to get money (type 'resell' then Enter)\n----------------------------------------------------\n-Inventory (type 'inv' then Enter)\n----------------------------------------------------\n\n -Type 'continue' then Enter to begin the game.");
- choix_menu_en = Convert.ToString(Console.ReadLine());
- }
- //Gestion Boutique
- if (choix_menu_fr == "boutique")
- {
- Console.WriteLine("\n\n\n\n\n---------------------------------------------------------------------\n\n Argent : " + argent + "$" + "\n Points : " + score + "\n\n---------------------------------------------------------------------\n\n Boutique\n\n----------------------------------------------------\n 20$ -DéTrapeur (Prévoyez l'arrivée d'un piège en le détruisant sans même l'avoir vue !) tape 'detrapeur' puis Entre pour acheter \n----------------------------------------------------\n\n -En développement...\n\nTape retour pour retourner au menu. ");
- string choix_boutique_fr = Convert.ToString(Console.ReadLine());
- //Achat Détrapeur
- if (choix_boutique_fr == "detrapeur")
- {
- if (argent < prix_detrapeur)
- {
- Console.WriteLine("\nVous n'avez pas assez d'argent !\nAllez vendre vos points accumulés dans l'option revente.\n\nAppuyez sur 'Entrer' pour retourner.");
- System.Threading.Thread.Sleep(3500);
- menu = true;
- }
- else if (argent >= prix_detrapeur)
- {
- Console.WriteLine("\nVous avez acheté un DéTrapeur pour " + prix_detrapeur + "$\n\nAppuyez sur Entrer pour retourner au menu.");
- element_detrapeur = element_detrapeur + "DéTrapeur ";
- argent -= 20;
- menu = true;
- }
- }
- }
- else if (choix_menu_en == "shop")
- {
- Console.WriteLine("\n\n\n\n\n---------------------------------------------------------------------\n\n Money : " + argent + "$" + "\n Points : " + score + "\n\n---------------------------------------------------------------------\n\n Shop\n---------------------------------------------------------------------\n\n---------------------------------------------------------------------\n 20$ -UnTraper (Predict the arrival of a trap by destroying it without even seeing it!) type untraper then Enter to buy \n---------------------------------------------------------------------\n\n -In development...\n---------------------------------------------------------------------\n\nType 'return' to return to the menu. ");
- string choix_boutique_en = Convert.ToString(Console.ReadLine());
- //Achat Détrapeur Anglais
- if (choix_boutique_en == "untraper")
- {
- if (argent < prix_detrapeur)
- {
- Console.WriteLine("\nYou don't have enough money !\nGo sell your accumulated points in the resell option.");
- System.Threading.Thread.Sleep(2500);
- menu = true;
- }
- else if (argent >= prix_detrapeur)
- {
- element_detrapeur = element_detrapeur + " |UnTraper| ";
- Console.WriteLine("You bought an UnTraper for " + prix_detrapeur + "$\n\nPress 'Enter' to return to the menu.");
- argent -= 20;
- menu = true;
- }
- }
- }
- if (choix_menu_fr == "inv")
- {
- if (element_detrapeur == "")
- {
- Console.WriteLine("\nVous n'avez rien dans votre inventaire !\n\nAppuyez sur 'Entrer' pour retourner.");
- System.Threading.Thread.Sleep(2500);
- menu = true;
- }
- else
- {
- Console.WriteLine("Tu as: " + element_detrapeur);
- Console.WriteLine("\nAppuyez sur Entrer pour retourner au menu.");
- }
- }
- else if (choix_menu_en == "inv")
- {
- if (element_detrapeur == "")
- {
- Console.WriteLine("\nYou got nothing in your inventory !");
- System.Threading.Thread.Sleep(2500);
- menu = true;
- }
- else
- {
- Console.WriteLine("\nYou have: " + element_detrapeur);
- }
- }
- if (choix_menu_fr == "revente")
- {
- if (score == 0)
- {
- menu = true;
- Console.WriteLine("\nVous n'avez pas de points a revendre !\n\nAppuyez sur 'Entrer' pour retourner.");
- }
- else if (score > 0)
- {
- argent += score * 10;
- Console.WriteLine("Vous avez vendu " + score + " points pour " + score * 10 + "$\n\nAppuyez sur Entrer pour revenir au menu.");
- score = 0;
- }
- }
- else if (choix_menu_en == "resell")
- {
- if (score == 0)
- {
- menu = true;
- Console.WriteLine("\nYou don't have any points to resell !");
- System.Threading.Thread.Sleep(2500);
- }
- else if (score > 0)
- {
- argent += score * 10;
- Console.WriteLine("You sold " + score + " points for " + score * 10 + "$");
- score = 0;
- }
- }
- if (choix_menu_fr == "continuer")
- {
- System.Threading.Thread.Sleep(1500);
- Console.WriteLine("\n\n(entre gauche, pour aller à gauche, droite, pour aller à droite, ou avant, pour aller en avant.)");
- menu = false;
- }
- else if (choix_menu_en == "continue")
- {
- System.Threading.Thread.Sleep(1500);
- Console.WriteLine("\n\n(enter left, to go left, right, to go right, or forward, to go forward.)");
- menu = false;
- }
- choix_chemin = Convert.ToString(Console.ReadLine());
- Random random = new Random();
- if (choix_language == "fr")
- {
- var names_fr = new List<string> { "gauche", "droite", "avant" };
- int index_fr = random.Next(names_fr.Count);
- var name_fr = names_fr[index_fr];
- names_fr.RemoveAt(index_fr);
- piege = name_fr;
- }
- else if (choix_language == "en")
- {
- var names_en = new List<string> { "left", "right", "forward" };
- int index_en = random.Next(names_en.Count);
- var name_en = names_en[index_en];
- names_en.RemoveAt(index_en);
- piege = name_en;
- }
- if (choix_chemin != result1)
- if (choix_chemin != result2)
- if (choix_chemin != result3)
- if (choix_language == "en")
- {
- anticheater = true;
- Console.WriteLine("Have you tryed to cheat right there? Or was it just a mistake? Please restart the program.");
- mort = true;
- }
- else if (choix_language == "fr")
- {
- anticheater = true;
- Console.WriteLine("Avez-vous essayé de tricher? Ou n'était-ce qu'une erreur? Veuillez redémarrer le programme.");
- mort = true;
- }
- if (mort != true)
- {
- if (choix_chemin != piege)
- {
- if (choix_language == "fr")
- {
- score += 1;
- Console.WriteLine("Bravo ! Tu as maintenant " + score + " points.");
- menu = true;
- }
- else if (choix_language == "en")
- {
- score += 1;
- Console.WriteLine("Great! You now have " + score + " points.");
- menu = true;
- }
- }
- }
- if (choix_chemin == piege)
- {
- if (anticheater != true)
- {
- if (choix_language == "fr")
- {
- if (element_detrapeur == "DéTrapeur")
- {
- Console.WriteLine("Tu possède un DéTrapeur et un piège est face à toi !\n\n");
- Console.WriteLine("Tape 'utiliser' pour te sauver mais perdre ton DéTrapeur (Tu peut toujours en racheter un autre dans la boutique!)");
- string utiliser_detrapeur = Convert.ToString(Console.ReadLine());
- if (utiliser_detrapeur == "utiliser")
- {
- mort = false;
- Console.WriteLine("Tu as survécu!");
- System.Threading.Thread.Sleep(3500);
- }
- else if (element_detrapeur == "")
- {
- mort = true;
- Console.WriteLine("Tu est tombé dans le piège, perdu!");
- }
- }
- }
- else if (choix_language == "en")
- {
- if (element_detrapeur == "UnTraper")
- {
- Console.WriteLine("You got an UnTraper and a trap is facing you!\n\n");
- Console.WriteLine("Type 'use' to save yourself but loose your UnTraper. (You may always buy another one at the shop!)");
- string utiliser_detrapeur_en = Convert.ToString(Console.ReadLine());
- if (utiliser_detrapeur_en == "use")
- {
- menu = true;
- mort = false;
- Console.WriteLine("Tu as survécu!");
- System.Threading.Thread.Sleep(3500);
- }
- else
- {
- mort = true;
- Console.WriteLine("You fell on a trap, game over !");
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement