We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently Square.next and Tile.next are implemented the same. I propose a global next method, like so:
def next(obj): if obj is a square or tile: {default next implementation} raise type error
Alternatively, a class "positionable" with a next method that both square and tile inherit from, but this seems a little weird.
The text was updated successfully, but these errors were encountered:
2ec285f
Was fixed using the above implementation, but hasattr instead of isinstance. Also makes it easier to implement board attr checking later on.
hasattr
isinstance
board
Sorry, something went wrong.
Innoviox
No branches or pull requests
Currently Square.next and Tile.next are implemented the same. I propose a global next method, like so:
def next(obj):
if obj is a square or tile:
{default next implementation}
raise type error
Alternatively, a class "positionable" with a next method that both square and tile inherit from, but this seems a little weird.
The text was updated successfully, but these errors were encountered: