<commit_before># -*- coding: utf8 -*-

from CommandAbstract import CommandAbstract
from CommandException import CommandException
from Area import Area


class CommandMove(CommandAbstract):
	def run(self):
		if len(self._args) == 0:
			raise CommandException("Where shall I go ?")

		direction = self._args[0]
		if direction not in ("north", "east", "south", "west"):
			raise CommandException("%s is not a valid direction" % direction)

		area = Area.getByIdCaracterAndDirection(
			self._player._model.getIdCharacter(), direction
		)

		if area is None:
			raise CommandException('I cannot go there')
		else:
			self._player.goTo(area._model.getPk())
			print('lets go %s' % direction)
		#~ Get the area to go from the player (current area) and the direction<commit_msg>h forgotten<commit_after># -*- coding: utf8 -*-

from CommandAbstract import CommandAbstract
from CommandException import CommandException
from Area import Area


class CommandMove(CommandAbstract):
	def run(self):
		if len(self._args) == 0:
			raise CommandException("Where shall I go ?")

		direction = self._args[0]
		if direction not in ("north", "east", "south", "west"):
			raise CommandException("%s is not a valid direction" % direction)

		area = Area.getByIdCharacterAndDirection(
			self._player._model.getIdCharacter(), direction
		)

		if area is None:
			raise CommandException('I cannot go there')
		else:
			self._player.goTo(area._model.getPk())
			print('lets go %s' % direction)
		#~ Get the area to go from the player (current area) and the direction
{'fraction_non_alphanumeric': 0.11161583387410773, 'fraction_numerical': 0.003893575600259572, 'mean_word_length': 4.429577464788732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7098339', 'n_tokens_mistral': 491, 'n_tokens_neox': 438, 'n_words': 156}