Making the domain-model of tic tac toe
- by devoured elysium
I am trying to make the domain model of a Tic Tac Toe game. I'll try then to go on through the various steps of the Unified Process and later implement it in some language (C# or Java).
I'd like to have some feedback if I'm going on the right path:
I've defined the game with two actors, Player O and Player X.
I'm not sure about defining both a Tile and a Tile State. Maybe I should only define a Tile and have the 3 possible states specialize from it?
I'm not sure what is best: to have both Player O and Player X be associations with Tic Tac Toe or have them inherit from Player that is associated with Tic Tac Toe. Following the design shown on the pic, in theory we could have a Tic Tac Toe concept with 2 Player O's, which wouldn't be correct. What is your opinion on this?
Also, am I missing something in the diagram? Although I can't see any other actors for Tic Tac Toe, should I have any other?
Thanks