Open metaloph1l opened 12 years ago
We should create a package named domain with the following domain objects (Classes):
For the client settings (e.g. Resolution) I think we dont actually need a separate class, we can just save it in a properties file and read it during program startup.
Imho it is not that simple. There is a little bit of a mixup between this issue and issue #1. I've already taken issue #1 and put some work in it.
Issue #1 contains the labyrinth itself (or playing field, whatever you prefer) and the pacmans. What I did already try to work out of the exercise description is the following:
class Pacman
with either 3 subclasses or type variable (=enum) -> Issue #1class Labyrinth
with Map<Coordinate,Element>
-> Issue #1movable() == false
). However, a pacman can move onto a Square (movable() == true
). Additionally, a square has points in it. Therefore, methods for reset, hasPoints/takePoints are needed in the model. -> Issue #1This issue:
Map<Player, Statistics> currentGameStatistics
, obviously inside the current game, and another Map<Player, Statistics> globalStatistics
outside of the current game.List<Player>
or .entrySet()
-method of next point.Map<Player,PacmanWrapper> assigned
-> This is very important because we need to switch between distinct states in the game. Otherwise we could have a inconsistent state where we have two players with the same color that meet each other. (State Pattern could be used here)
Map<Player,PacmanWrapper>
. The distinct switch can then be made by the simple command: assigned = newMapping;
Did you see the UML stuff I have uploaded to git? I used a little different terminology but it is still similar. Board would be Labyrinth and Piece would be Pacman
Yeah, I just noticed it now and did have a slight look at it. Great job you did there. Other than the terminology it seems quite similar.
However I have noticed two things:
Map<Player, PacmanWrapper
)Map<Player, PacmanWrapper
). I'm not sure how to map a Java Map in an uml diagram. If that is what you meant I agree with you.I have uploaded a communication diagram outlining the design of player and square. I think the connection between player and board is useful to get the next square based on the current square and the direction, since the board is the expert for that. I have explained that in more detail in the UML.
As this issue is actually about settings and statistics, so I have updated the issue title. See Issue #1 for Domain Model discussion.
Design should contain model for statistics that are saved throughout several games, and specific (client-side) settings (e.g. resolution)