<commit_before>

import cmd
from room import get_room
from actions import get_action
from inventory import Inventory
import textwrap


intro = textwrap.wrap('''As you come to from a sleep that certaintly didn't feel welcomed,
you notice you are in a strange bed, you think to yourself "This is'nt my bed."
you look around the room and nothing is familiar to you, as you get up the
clothes you wear are not familiar to you eithre, at this point you get up and
stumble out of bed,as you exit the room you notice you are in an inn by the
people around and the obvious clerk at a counter. "Why hello there stranger"
the clerk blurts out in a loud voice, as you look at him he explains "Your
confused look tells me your not from around here... or the fact that the man
who brought you in here said he found you nude beaten and unconcious on the
road... anyways you're welcome to stay here till you think you can find your
way home, the problem is that the nearest town from hereis a journey of about
two months on foot." so will you stay here or find your way home? Will you
simply stay and forge a living? Do you have family? Maybe you can find some
clues that offer an explanation to all of this. you leave the inn and find a
town bustling nows where your adventure starts.''') 

controls = textwrap.wrap('''When you begin playing this game, there are a few commands
available to you, starting with movement, you can move north, south, east, and
west, typing these will move you to next area, when possible you may also climb
up or down simply by typing climb. At any moment in the game you can type help
and a list of all the commands in the game will be shown, as well as when you
type help and an action i.e "help north" a short description of what this
command does will be given.''')

print(intro)
print('')
print(controls)
print('')


class Game(cmd.Cmd):
    prompt = '> '

    def __init__(self):
#-----------------------------------------------------------------------
#Here the game is initialized asking for commands via the Cmd module,
#the variables given are the first room you start in and prints out the
#location

        cmd.Cmd.__init__(self)
        #self.get = get_action(action)
	self.loc = get_room('village')
        self.look()
	self.inventory = Inventory()
#------------------------------------------------------------------------
#This checks which room you are in if you can go the way for the command
#given and prints out your location
    def move(self, dir):
        newroom = self.loc._neighbor(dir)
        if newroom is None:
            print('''You cannot go this away''')
            self.look()
        else:
            self.loc = get_room(newroom)
            self.look()

    def look(self):
        print((self.loc.name))
        print('')
        for line in textwrap.wrap(self.loc.description, 72):
            print(line)

#-----------------------------------------------------------------------
#commands

    def do_inventory(self, args):
        '''Checks Inventory'''
	print(self.inventory.bag())

    def do_n(self, args):
        '''goes north'''
        self.move('n')

    def do_s(self, args):
        '''goes south'''
        self.move('s')

    def do_e(self, args):
        '''goes east'''<commit_msg>Indentation fixds<commit_after>

import cmd
from room import get_room
from actions import Actions
from inventory import Inventory
import textwrap


intro = textwrap.wrap('''As you come to from a sleep that certaintly didn't feel welcomed,
you notice you are in a strange bed, you think to yourself "This is'nt my bed."
you look around the room and nothing is familiar to you, as you get up the
clothes you wear are not familiar to you eithre, at this point you get up and
stumble out of bed,as you exit the room you notice you are in an inn by the
people around and the obvious clerk at a counter. "Why hello there stranger"
the clerk blurts out in a loud voice, as you look at him he explains "Your
confused look tells me your not from around here... or the fact that the man
who brought you in here said he found you nude beaten and unconcious on the
road... anyways you're welcome to stay here till you think you can find your
way home, the problem is that the nearest town from hereis a journey of about
two months on foot." so will you stay here or find your way home? Will you
simply stay and forge a living? Do you have family? Maybe you can find some
clues that offer an explanation to all of this. you leave the inn and find a
town bustling nows where your adventure starts.''') 

controls = textwrap.wrap('''When you begin playing this game, there are a few commands
available to you, starting with movement, you can move north, south, east, and
west, typing these will move you to next area, when possible you may also climb
up or down simply by typing climb. At any moment in the game you can type help
and a list of all the commands in the game will be shown, as well as when you
type help and an action i.e "help north" a short description of what this
command does will be given.''')

print(intro)
print('')
print(controls)
print('')


class Game(cmd.Cmd):
    prompt = '> '

    def __init__(self):
#-----------------------------------------------------------------------
#Here the game is initialized asking for commands via the Cmd module,
#the variables given are the first room you start in and prints out the
#location

        cmd.Cmd.__init__(self)
        #self.get = get_action(action)
        self.loc = get_room('village')
        self.look()
        self.inventory = Inventory()
        self.action = Actions() 
#------------------------------------------------------------------------
#This checks which room you are in if you can go the way for the command
#given and prints out your location
    def move(self, dir):
        newroom = self.loc._neighbor(dir)
        if newroom is None:
            print('''You cannot go this away''')
            self.look()
        else:
            self.loc = get_room(newroom)
            self.look()

    def look(self):
        print((self.loc.name))
        print('')
        for line in textwrap.wrap(self.loc.description, 72):
            print(line)

#-----------------------------------------------------------------------
#commands

    def do_inventory(self, args):
        '''Checks Inventory'''
        print(self.inventory.bag())

    def do_n(self, args):
        '''goes north'''
        self.move('n')

    def do_s(self, args):
        '''goes south'''
        self.move('s')

    def do_e(self, args):
        '''goes east'''
{'fraction_non_alphanumeric': 0.1355261154256129, 'fraction_numerical': 0.0006091061367443277, 'mean_word_length': 2.413721413721414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5126721', 'n_tokens_mistral': 1734, 'n_tokens_neox': 1677, 'n_words': 904}