def light_spaceship(g, x, y, invert=False):
    """
    Puts the lightweight spaceship right in the grid starting from icoords
    """
    if not invert:
        g.add_element(x,y)
        g.add_element(x+2,y)
        g.add_element(x+3,y+1)
        g.add_element(x+3,y+2)
        g.add_element(x+3,y+3)
        g.add_element(x+3,y+4)
        g.add_element(x+2,y+4)
        g.add_element(x+1,y+4)
        g.add_element(x,y+3)
    else:
        g.add_element(x,y)
        g.add_element(x+2,y)
        g.add_element(x+3,y-1)
        g.add_element(x+3,y-2)
        g.add_element(x+3,y-3)
        g.add_element(x+3,y-4)
        g.add_element(x+2,y-4)
        g.add_element(x+1,y-4)
        g.add_element(x,y-3)

    Puts the lightweight spaceship right in the grid starting from icoords
    
recipes/Python/577976_extensible_Conways_Game/recipe-577976.py