langton.py
def _next_plane(self) -> None:
        """Generates the next plane based on two simple rules."""
        row, column = self._ant_pos
        rule = self._rules[self._plane[row][column]]
        self._plane[row][column] = rule["flip"]
        if rule["turn"] == "left":
            self._ant_direction = (self._ant_direction + 1) % 4
        else:
            self._ant_direction = (self._ant_direction - 1) % 4
        # Move forward one unit
        self._move_forward()
Generates the next plane based on two simple rules.
Generates the next plane based on two simple rules.
Generates the next plane based on two simple rules .
def _next_plane(self) -> None:
        row, column = self._ant_pos
        rule = self._rules[self._plane[row][column]]
        self._plane[row][column] = rule["flip"]
        if rule["turn"] == "left":
            self._ant_direction = (self._ant_direction + 1) % 4
        else:
            self._ant_direction = (self._ant_direction - 1) % 4
        self._move_forward()
def _next_plane ( self ) -> None : row , column = self . _ant_pos rule = self . _rules [ self . _plane [ row ] [ column ] ] self . _plane [ row ] [ column ] = rule [ "flip" ] if rule [ "turn" ] == "left" : self . _ant_direction = ( self . _ant_direction + 1 ) % 4 else : self . _ant_direction = ( self . _ant_direction - 1 ) % 4 self . _move_forward ( )
Generates the next plane based on two simple rules.
Generates the next plane based on two simple rules .
"""Generates the next plane based on two simple rules.""" # Move forward one unit
self