conways_gol/cells/living_cells_initialization.py
def beacon(self) -> np.ndarray:
        """
        Method that implements a Beacon oscillator.

        :return: universe with a beacon at its center
        """
        grid = self.universe
        beacon = [[1, 1, 0, 0],
                  [1, 1, 0, 0],
                  [0, 0, 1, 1],
                  [0, 0, 1, 1]]
        if len(grid) % 2 == 0:
            grid[int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2)),
            int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2))] = beacon
        else:
            grid[int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2 + 1)),
            int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2 + 1))] = beacon
        return grid

        Method that implements a Beacon oscillator.

        :return: universe with a beacon at its center
        
Method that implements a Beacon oscillator.
Method that implements a Beacon oscillator .
def beacon(self) -> np.ndarray:
        grid = self.universe
        beacon = [[1, 1, 0, 0],
                  [1, 1, 0, 0],
                  [0, 0, 1, 1],
                  [0, 0, 1, 1]]
        if len(grid) % 2 == 0:
            grid[int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2)),
            int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2))] = beacon
        else:
            grid[int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2 + 1)),
            int((len(grid) - len(beacon)) / 2):(
                    len(grid) - int((len(grid) - len(beacon)) / 2 + 1))] = beacon
        return grid
def beacon ( self ) -> np . ndarray : grid = self . universe beacon = [ [ 1 , 1 , 0 , 0 ] , [ 1 , 1 , 0 , 0 ] , [ 0 , 0 , 1 , 1 ] , [ 0 , 0 , 1 , 1 ] ] if len ( grid ) % 2 == 0 : grid [ int ( ( len ( grid ) - len ( beacon ) ) / 2 ) : ( len ( grid ) - int ( ( len ( grid ) - len ( beacon ) ) / 2 ) ) , int ( ( len ( grid ) - len ( beacon ) ) / 2 ) : ( len ( grid ) - int ( ( len ( grid ) - len ( beacon ) ) / 2 ) ) ] = beacon else : grid [ int ( ( len ( grid ) - len ( beacon ) ) / 2 ) : ( len ( grid ) - int ( ( len ( grid ) - len ( beacon ) ) / 2 + 1 ) ) , int ( ( len ( grid ) - len ( beacon ) ) / 2 ) : ( len ( grid ) - int ( ( len ( grid ) - len ( beacon ) ) / 2 + 1 ) ) ] = beacon return grid
Method that implements a Beacon oscillator.
Method that implements a Beacon oscillator .
"""
        Method that implements a Beacon oscillator.

        :return: universe with a beacon at its center
        """
universe with a beacon at its center
universe with a beacon at its center
self