Game design.

From: R. Clayton <>
Date: Fri, 29 Feb 2008 00:53:21 -0500
A game has four foundations, one for each suit.  If there were a main, I would
create 4 instances of a foundation class, each of a different suit.  However,
since we are only building a player api for this, should I create a class
"foundations," which holds the four foundations?

  Do what you think best.  Somewhat more helpfully, do a quick noun-verb
  analysis on the first sentence:

    A game [noun] has [state-of-being verb] four [adjective] foundations
    [noun], one for each suit [adjective].

  The two nouns are classes and the linking verb indicates the relation between
  them: a game has foundations; the first adjective tells how many
  foundations.  The last adjective phrase indicates an attribute for a
  foundation: the associated suit (which is another noun).

  This analysis seems to suggest using a game class which contains four
  foundation-class instances indexed by suit, which is similar to your
  suggestion, but using terms more aligned with the problem (which is
  important).  There are other interpretations of this analysis, and other
  kinds of analyses you could do.  Noun-verb analysis has the advantage of
  being relatively simple and effective; once you get a model designed and
  implemented, you'll have a solution in the neighborhood of what you want and
  then you can fiddle around with the parts that strike you as being off.
Received on Fri Feb 29 2008 - 00:53:35 EST

This archive was generated by hypermail 2.2.0 : Mon Mar 03 2008 - 07:17:31 EST