ljvmiranda921 / seagull

A Python Library for Conway's Game of Life
https://pyseagull.readthedocs.io/en/latest/index.html#
MIT License
174 stars 30 forks source link

Add feature for relative paths #32

Open ljvmiranda921 opened 4 years ago

ljvmiranda921 commented 4 years ago

Not yet sure what's the best API for this, but ideally we should add the ability to add lifeforms relative to one another, instead of adding their coordinates explicitly. Might need to think of adding attributes such as anchor and offset (lol, can you count how many times I used the word "add"?)

board.add(my_lifeform, loc=(0,0))
board.add(another_lifeform, relative_to=my_lifeform, loc="below", offset=(0,1))