project/grid.py
def rotate(self, rule):
        """
        Changes current direction based on rule
        """
        if rule == "R":
            if self.direction == "N":
                self.direction = "E"
            elif self.direction == "E":
                self.direction = "S"
            elif self.direction == "S":
                self.direction = "W"
            elif self.direction == "W":
                self.direction = "N"

        elif rule == "L":
            if self.direction == "N":
                self.direction = "W"
            elif self.direction == "E":
                self.direction = "N"
            elif self.direction == "S":
                self.direction = "E"
            elif self.direction == "W":
                self.direction = "S"

        Changes current direction based on rule
        
Changes current direction based on rule
Changes current direction based on rule
def rotate(self, rule):
        if rule == "R":
            if self.direction == "N":
                self.direction = "E"
            elif self.direction == "E":
                self.direction = "S"
            elif self.direction == "S":
                self.direction = "W"
            elif self.direction == "W":
                self.direction = "N"
        elif rule == "L":
            if self.direction == "N":
                self.direction = "W"
            elif self.direction == "E":
                self.direction = "N"
            elif self.direction == "S":
                self.direction = "E"
            elif self.direction == "W":
                self.direction = "S"
def rotate ( self , rule ) : if rule == "R" : if self . direction == "N" : self . direction = "E" elif self . direction == "E" : self . direction = "S" elif self . direction == "S" : self . direction = "W" elif self . direction == "W" : self . direction = "N" elif rule == "L" : if self . direction == "N" : self . direction = "W" elif self . direction == "E" : self . direction = "N" elif self . direction == "S" : self . direction = "E" elif self . direction == "W" : self . direction = "S"
Changes current direction based on rule
Changes current direction based on rule
"""
        Changes current direction based on rule
        """
self
rule