--- "aacockburn" <[EMAIL PROTECTED]> wrote:
> >>     open := roll1 + roll2 < 10.
> >>     spare := (roll1 < 10)   and:  (roll1 + roll2 = 10).
> >>     strike := roll1 = 10.

> --- JeffGrigg wrote:
> << Have you considered reversing the order and using not?
>    I think that reversing the order and using 'not' would
>    make it (at least more) clear that only one could be
>    set, and always one will be set.) >>

--- "aacockburn" <[EMAIL PROTECTED]> wrote:
> I have no trouble reversing the order to: 
>      strike := roll1 = 10.
>      spare := (roll1 < 10)   and:  (roll1 + roll2 = 10).
>      open := roll1 + roll2 < 10.
> but it should be clear somehow that they are mutually
> exclusive --- two of them can't possibly be set. 

Now I just have to figure out how to refactor my posts, so that they 
will be more clear!  ;->

What I had in mind was to reverse the order /and then use each 
boolean in the following expressions./  Like this:

  strike := roll1 = 10.
  spare  := (strike not) and: (roll1 + roll2 = 10).
  open   := (strike not) and: (spare not).

I get here by saying, "roll1 < 10" means "not a strike."  The 
expression for "open" is more complex now, but I think it does make 
it more clear that everything not a strike or spare is an "open."





To Post a message, send it to:   [EMAIL PROTECTED]

To Unsubscribe, send a blank message to: [EMAIL PROTECTED]

ad-free courtesy of objectmentor.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/extremeprogramming/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to