intficpy/parser.py
def parseInput(self, input_string):
        """
        Parse player input, and respond to commands each turn
        Takes argument input_string, the raw player input
        Called by mainLoop in terminal version, turnMain (gui.py) in GUI version
        Returns 0 when complete
        """
        self.clearCommand()

        self.turns += 1
        # print back the player's command
        self.game.addEvent(
            "command", 0, text=input_string, style=self.game.command_event_style
        )
        # clean and self.tokenize
        input_string = cleanInput(input_string)
        self.recordInput(input_string)

        self.command = Command(input_string)
        if self.previous_command.has_sticky_sequence:
            self.command.sequence = self.previous_command.sequence

        if not self.game.ended:
            try:
                self.runTurnCommand()
            except ParserError as e:
                self.game.addTextToEvent(
                    "turn", e.__str__(),
                )
                if self.previous_command.has_active_sequence:
                    self.previous_command.sequence.play()
            except AbortTurn:
                pass
            return

        if self.command.tokens == ["full", "score"]:
            FullScoreVerb().verbFunc(self.game)
        elif self.command.tokens == ["score"]:
            ScoreVerb().verbFunc(self.game)
        elif self.command.tokens == ["fullscore"]:
            FullScoreVerb().verbFunc(self.game)
        elif self.command.tokens == ["about"]:
            self.game.aboutGame.printAbout(self.game)
        else:
            self.game.addTextToEvent(
                "turn", "The game has ended. Commands are SCORE, FULLSCORE, and ABOUT.",
            )

        Parse player input, and respond to commands each turn
        Takes argument input_string, the raw player input
        Called by mainLoop in terminal version, turnMain (gui.py) in GUI version
        Returns 0 when complete
        
Parse player input, and respond to commands each turn
Takes argument input_string, the raw player input
Called by mainLoop in terminal version, turnMain (gui.py) in GUI version
Returns 0 when complete
Parse player input and respond to commands each turn Takes argument input_string the raw player input Called by mainLoop in terminal version turnMain ( gui . py ) in GUI version Returns 0 when complete
def parseInput(self, input_string):
        self.clearCommand()
        self.turns += 1
        self.game.addEvent(
            "command", 0, text=input_string, style=self.game.command_event_style
        )
        input_string = cleanInput(input_string)
        self.recordInput(input_string)
        self.command = Command(input_string)
        if self.previous_command.has_sticky_sequence:
            self.command.sequence = self.previous_command.sequence
        if not self.game.ended:
            try:
                self.runTurnCommand()
            except ParserError as e:
                self.game.addTextToEvent(
                    "turn", e.__str__(),
                )
                if self.previous_command.has_active_sequence:
                    self.previous_command.sequence.play()
            except AbortTurn:
                pass
            return
        if self.command.tokens == ["full", "score"]:
            FullScoreVerb().verbFunc(self.game)
        elif self.command.tokens == ["score"]:
            ScoreVerb().verbFunc(self.game)
        elif self.command.tokens == ["fullscore"]:
            FullScoreVerb().verbFunc(self.game)
        elif self.command.tokens == ["about"]:
            self.game.aboutGame.printAbout(self.game)
        else:
            self.game.addTextToEvent(
                "turn", "The game has ended. Commands are SCORE, FULLSCORE, and ABOUT.",
            )
def parseInput ( self , input_string ) : self . clearCommand ( ) self . turns += 1 self . game . addEvent ( "command" , 0 , text = input_string , style = self . game . command_event_style ) input_string = cleanInput ( input_string ) self . recordInput ( input_string ) self . command = Command ( input_string ) if self . previous_command . has_sticky_sequence : self . command . sequence = self . previous_command . sequence if not self . game . ended : try : self . runTurnCommand ( ) except ParserError as e : self . game . addTextToEvent ( "turn" , e . __str__ ( ) , ) if self . previous_command . has_active_sequence : self . previous_command . sequence . play ( ) except AbortTurn : pass return if self . command . tokens == [ "full" , "score" ] : FullScoreVerb ( ) . verbFunc ( self . game ) elif self . command . tokens == [ "score" ] : ScoreVerb ( ) . verbFunc ( self . game ) elif self . command . tokens == [ "fullscore" ] : FullScoreVerb ( ) . verbFunc ( self . game ) elif self . command . tokens == [ "about" ] : self . game . aboutGame . printAbout ( self . game ) else : self . game . addTextToEvent ( "turn" , "The game has ended. Commands are SCORE, FULLSCORE, and ABOUT." , )
Parse player input, and respond to commands each turn
Takes argument input_string, the raw player input
Called by mainLoop in terminal version, turnMain (gui.py) in GUI version
Returns 0 when complete
Parse player input and respond to commands each turn Takes argument input_string the raw player input Called by mainLoop in terminal version turnMain ( gui . py ) in GUI version Returns 0 when complete
"""
        Parse player input, and respond to commands each turn
        Takes argument input_string, the raw player input
        Called by mainLoop in terminal version, turnMain (gui.py) in GUI version
        Returns 0 when complete
        """ # print back the player's command # clean and self.tokenize
self
input_string