Making the domain-model of tic tac toe
Posted
by devoured elysium
on Stack Overflow
See other posts from Stack Overflow
or by devoured elysium
Published on 2010-06-07T22:41:56Z
Indexed on
2010/06/08
0:12 UTC
Read the original article
Hit count: 622
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 aTile State
. Maybe I should only define aTile
and have the 3 possible states specialize from it? - I'm not sure what is best: to have both
Player O
andPlayer X
be associations withTic Tac Toe
or have them inherit fromPlayer
that is associated withTic Tac Toe
. Following the design shown on the pic, in theory we could have aTic 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
© Stack Overflow or respective owner