Wilfcastle / colonies

Implementation of the award-winning game of Colonies in python.
0 stars 2 forks source link

Board representation #10

Open golmschenk opened 9 years ago

golmschenk commented 9 years ago

I would suggest moving the text representation of a board from the Board class to the Console class. Best to keep the anything involving what the user sees in the class built to interact with the user and keep the Board as a backend object.

Jusctsch5 commented 9 years ago

I think that the Console will be more of the backend. The Player object will handle the input with my soon-to-be-reviewed change. It makes the most sense for the Board and types of Elements to have some sort of object (through inheritance or composition) with the ability to display itself.

I see no issue in moving the method that performs the display into the Console, though, but it probably will have to end up in the context of the Board at some point.

On Fri, Oct 2, 2015 at 3:08 PM, golmschenk notifications@github.com wrote:

I would suggest moving the text representation of a board from the Board class to the Console class. Best to keep the anything involving what the user sees in the class built to interact with the user and keep the Board as a backend object.

— Reply to this email directly or view it on GitHub https://github.com/Wilfcastle/colonies/issues/10.

John Schumacher

golmschenk commented 9 years ago

Ok. I was more under the thought that all the objects that make up the game (the reference to the board, players, pieces, etc) should be made completely disjoint from the display and input. That makes the ability to refactor and improve things later much easier. But perhaps I'm just too used to seeing a MVC-ish type setup in other development I've seen (which is usually apps or webapps). That and vision algorithms which take almost no user input are really the only kinds of things I've looked into much, so I may just have a bias.

Jusctsch5 commented 9 years ago

I am definitely open to suggestions. I've written zero user interfaces so far, so I don't have much bias or much idea on how to do it. How would you propose making the objects disjoint from the display?

On Fri, Oct 2, 2015 at 10:15 PM, golmschenk notifications@github.com wrote:

Ok. I was more under the thought that all the objects that make up the game (the reference to the board, players, pieces, etc) should be made completely disjoint from the display and input. That makes the ability to refactor and improve things later much easier. But perhaps I'm just too used to seeing a MVC-ish type setup in other development I've seen (which is usually apps or webapps). That and vision algorithms which take almost no user input are really the only kinds of things I've looked into much, so I may just have a bias.

— Reply to this email directly or view it on GitHub https://github.com/Wilfcastle/colonies/issues/10#issuecomment-145197195.

John Schumacher