Skip to content
New issue

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

Add basic board representation methods somewhere sensible for re-use by Players and Game flow #30

Closed
munichpavel opened this issue Jan 3, 2021 · 0 comments · Fixed by #31

Comments

@munichpavel
Copy link
Owner

The check for win of #17, as well as getting waiting area information for #26 require GameState representation information, like a dict of player piece counts in the waiting and home areas. I have been thinking about where such methods belong. Initially I thought in a Player subclass, since part of the remit of the Player classes is to have different game state representations depending on their "choose move" algorithms.

I didn't want to put it in GameState as I already have the get_board_space method for accessing the game state. But I think GameState is the best place to put some basic, re-usable representation methods like waiting_areas_to_dict(), main_spaces_to_list() and home_areas_to_dict().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant