<commit_before>package mr_kitten;


import java.util.Random;
import java.util.*;

/**
 *  This class is the main class of the "World of Zuul" application. 
 *  "World of Zuul" is a very simple, text based adventure game.  Users 
 *  can walk around some scenery. That's all. It should really be extended 
 *  to make it more interesting!
 * 
 *  To play this game, create an instance of this class and call the "play"
 *  method.
 * 
 *  This main class creates and initialises all the others: it creates all
 *  rooms, creates the parser and starts the game.  It also evaluates and
 *  executes the commands that the parser returns.
 * 
 * @author  <NAME> and <NAME>
 * @version 2006.03.30
 */

public class Game 
{
    private Parser parser;
    private Room currentRoom;
    private Players MrKitten;
    private ArrayList<Item> items;
    private ArrayList<Characters> characters;
    
    /**
     * Create the game and initialise its internal map.
     */
    public Game() 
    {
        createRooms();
        createItems();
        createCharacters();
        MrKitten = new Players("Mr.Kitten");
        parser = new Parser();
     }

    /**
     * Create all the rooms and link their exits together.
     */
    private void createRooms()
    {
        //Declare rooms;
        Room kitchen,livingRoom,bedroom,street1,street2,sewer,petshop,theGreatDescent,dory,theFishPalace;
        Room tavernSanRicardo,starWars,theCloset,theEnd;
                
        kitchen = new Room ("are in the Kitchen of the Master's house","kitchen");
        livingRoom = new Room ("are in the Living room of the Master's house","livingRoom");
        bedroom = new Room ("are in the Bedroom of the Master's house","bedroom");
        street1 = new Room ("are in the Street near the entrance of the house","street1");
        street2 = new Room ("are in the Street near the Petshop","street2");
        sewer = new Room ("are in the Sewer under the streets","sewer");
        petshop = new Room ("are in the Petshop","petshop");
        theGreatDescent = new Room ("are going deep down under water","theGreatDescent");
        dory = new Room ("are with Dory the great fish","dory");
        theFishPalace = new Room ("are in the Fish Palace","theFishPalace");
        tavernSanRicardo = new Room ("are in the magnificient Tavern Of San Ricardo","tavernSanRicardo");
        starWars = new Room ("are in a Galaxy far far away...","starWars");
        theCloset = new Room ("are ready to fight with lions","theCloset");
        theEnd = new Room ("did it, you did it, Yeah!","theEnd");
        
        //Declare doors and items
        Door doorKLr = new Door(livingRoom,kitchen); kitchen.addExit("east", doorKLr); livingRoom.addExit("west",doorKLr); 
        Door doorBLr = new Door (bedroom, livingRoom); livingRoom.addExit("east",doorBLr); bedroom.addExit("west",doorBLr);
        Item keyLivingStreet = new Item("home key", "this key opens the door to exit the master's house",0);
        LockedDoor doorS1Lr = new LockedDoor (keyLivingStreet, street1, livingRoom); livingRoom.addExit("south",doorS1Lr);street1.addExit("north",doorS1Lr);
        Door doorS2S1 = new Door (street2, street1);street1.addExit("east",doorS2S1); street2.addExit("west",doorS2S1);
        Door doorSS1 = new Door (sewer, street1);street1.addExit("down",doorSS1);sewer.addExit("up",doorSS1);
        Door doorPS2 = new Door (petshop, street2);street2.addExit("south",doorPS2);petshop.addExit("north",doorPS2);
        Door doorSS2 = new Door (sewer, street2);street2.addExit("down",doorSS2);sewer.addExit("up",doorSS2);
        Door doorGdP = new Door (theGreatDescent, petshop);petshop.addExit("down", doorGdP);theGreatDescent.addExit("up",doorGdP);
        Door doorDGd = new Door (dory, theGreatDescent);theGreatDescent.addExit("west",doorDGd); dory.addExit("east",doorDGd);
        Door doorFpGd = new Door (theFishPalace, theGreatDescent);theGreatDescent.addExit("down",doorFpGd);theFishPalace.addExit("up",doorFpGd);
        Item keyFishTavern = new Item ("blue key","This key opens the door between the fish palace and the San Ricardo tavern",0);
        LockedDoor doorFpTsr = new LockedDoor (keyFishTavern, theFishPalace, tavernSanRicardo);tavernSanRicardo.addExit("north", doorFpTsr); theFishPalace.addExit("south", doorFpTsr);
        Door doorSwTsr = new Door (starWars, tavernSanRicardo);tavernSanRicardo.addExit("up", doorSwTsr); starWars.addExit("down",doorSwTsr);
        Door doorCSw = new Door (theCloset,starWars);starWars.addExit("east",doorCSw);theCloset.addExit("west",doorCSw);
        Door doorEC = new Door (theEnd, theCloset);theCloset.addExit("south", doorEC);
        
        currentRoom = livingRoom;  // start game in master's house
    }

    /*
     * Create all the items in the game
     */
    private void createItems()
    {
        Item potionCareMin = new Item ("potionCareMin","This potion heals you for a small amount of your health",5);
        Item potionCareMax = new Item ("potionCareMax","This potion heals you for a big amount of your health",25);
        Item potionCareMean = new Item("potionCareMean","This potion heals you for a medium amount of your health",20);
        Item algea = new Item ("algea", "Je ne me rappelle plus à quoi sert ce truc", 10); //A COMPLETER
        Item potionBonus = new Item("potionBonus", "...", 25); //A COMPLETER
        Item superBite = new Item ("superBite","It's sharp and ready to rip your opponents' heads off",10);<commit_msg>Ajout des descriptions de algue et potion bonus<commit_after>package mr_kitten;


import java.util.Random;
import java.util.*;

/**
 *  This class is the main class of the "World of Zuul" application. 
 *  "World of Zuul" is a very simple, text based adventure game.  Users 
 *  can walk around some scenery. That's all. It should really be extended 
 *  to make it more interesting!
 * 
 *  To play this game, create an instance of this class and call the "play"
 *  method.
 * 
 *  This main class creates and initialises all the others: it creates all
 *  rooms, creates the parser and starts the game.  It also evaluates and
 *  executes the commands that the parser returns.
 * 
 * @author  <NAME> and <NAME>
 * @version 2006.03.30
 */

public class Game 
{
    private Parser parser;
    private Room currentRoom;
    private Players MrKitten;
    private ArrayList<Item> items;
    private ArrayList<Characters> characters;
    
    /**
     * Create the game and initialise its internal map.
     */
    public Game() 
    {
        createRooms();
        createItems();
        createCharacters();
        MrKitten = new Players("Mr.Kitten");
        parser = new Parser();
     }

    /**
     * Create all the rooms and link their exits together.
     */
    private void createRooms()
    {
        //Declare rooms;
        Room kitchen,livingRoom,bedroom,street1,street2,sewer,petshop,theGreatDescent,dory,theFishPalace;
        Room tavernSanRicardo,starWars,theCloset,theEnd;
                
        kitchen = new Room ("are in the Kitchen of the Master's house","kitchen");
        livingRoom = new Room ("are in the Living room of the Master's house","livingRoom");
        bedroom = new Room ("are in the Bedroom of the Master's house","bedroom");
        street1 = new Room ("are in the Street near the entrance of the house","street1");
        street2 = new Room ("are in the Street near the Petshop","street2");
        sewer = new Room ("are in the Sewer under the streets","sewer");
        petshop = new Room ("are in the Petshop","petshop");
        theGreatDescent = new Room ("are going deep down under water","theGreatDescent");
        dory = new Room ("are with Dory the great fish","dory");
        theFishPalace = new Room ("are in the Fish Palace","theFishPalace");
        tavernSanRicardo = new Room ("are in the magnificient Tavern Of San Ricardo","tavernSanRicardo");
        starWars = new Room ("are in a Galaxy far far away...","starWars");
        theCloset = new Room ("are ready to fight with lions","theCloset");
        theEnd = new Room ("did it, you did it, Yeah!","theEnd");
        
        //Declare doors and items
        Door doorKLr = new Door(livingRoom,kitchen); kitchen.addExit("east", doorKLr); livingRoom.addExit("west",doorKLr); 
        Door doorBLr = new Door (bedroom, livingRoom); livingRoom.addExit("east",doorBLr); bedroom.addExit("west",doorBLr);
        Item keyLivingStreet = new Item("home key", "this key opens the door to exit the master's house",0);
        LockedDoor doorS1Lr = new LockedDoor (keyLivingStreet, street1, livingRoom); livingRoom.addExit("south",doorS1Lr);street1.addExit("north",doorS1Lr);
        Door doorS2S1 = new Door (street2, street1);street1.addExit("east",doorS2S1); street2.addExit("west",doorS2S1);
        Door doorSS1 = new Door (sewer, street1);street1.addExit("down",doorSS1);sewer.addExit("up",doorSS1);
        Door doorPS2 = new Door (petshop, street2);street2.addExit("south",doorPS2);petshop.addExit("north",doorPS2);
        Door doorSS2 = new Door (sewer, street2);street2.addExit("down",doorSS2);sewer.addExit("up",doorSS2);
        Door doorGdP = new Door (theGreatDescent, petshop);petshop.addExit("down", doorGdP);theGreatDescent.addExit("up",doorGdP);
        Door doorDGd = new Door (dory, theGreatDescent);theGreatDescent.addExit("west",doorDGd); dory.addExit("east",doorDGd);
        Door doorFpGd = new Door (theFishPalace, theGreatDescent);theGreatDescent.addExit("down",doorFpGd);theFishPalace.addExit("up",doorFpGd);
        Item keyFishTavern = new Item ("blue key","This key opens the door between the fish palace and the San Ricardo tavern",0);
        LockedDoor doorFpTsr = new LockedDoor (keyFishTavern, theFishPalace, tavernSanRicardo);tavernSanRicardo.addExit("north", doorFpTsr); theFishPalace.addExit("south", doorFpTsr);
        Door doorSwTsr = new Door (starWars, tavernSanRicardo);tavernSanRicardo.addExit("up", doorSwTsr); starWars.addExit("down",doorSwTsr);
        Door doorCSw = new Door (theCloset,starWars);starWars.addExit("east",doorCSw);theCloset.addExit("west",doorCSw);
        Door doorEC = new Door (theEnd, theCloset);theCloset.addExit("south", doorEC);
        
        currentRoom = livingRoom;  // start game in master's house
    }

    /*
     * Create all the items in the game
     */
    private void createItems()
    {
        Item potionCareMin = new Item ("potionCareMin","This potion heals you for a small amount of your health",5);
        Item potionCareMax = new Item ("potionCareMax","This potion heals you for a big amount of your health",25);
        Item potionCareMean = new Item("potionCareMean","This potion heals you for a medium amount of your health",20);
        Item algea = new Item ("algea", "This algae has revitalizing properties. It can heal wounds and restore a medium amount of your health.", 10); //A COMPLETER
        Item potionBonus = new Item("potionBonus", "This potion heals you for a big amount of your health", 25); //A COMPLETER
        Item superBite = new Item ("superBite","It's sharp and ready to rip your opponents' heads off",10);
{'fraction_non_alphanumeric': 0.11261909041883876, 'fraction_numerical': 0.010246269998202408, 'mean_word_length': 3.5416326530612245, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '886867', 'n_tokens_mistral': 3554, 'n_tokens_neox': 3381, 'n_words': 1082}