[Tutor] Proper SQLite cursor handling?

Alan Gauld alan.gauld at yahoo.co.uk
Wed Jul 7 19:43:01 EDT 2021


On 06/07/2021 10:06, Alan Gauld via Tutor wrote:

> So the object model becomes (I need really UML for this!):
> Warning ASCII art coming up! Monospace font needed...
> 
> +++++++++++++++++++
> Hand
>  |
> Game<-boBSolitair1
>  |
> Strategy
> +++++++++++++++++++=

I've been thinking about this and am unclear about the strategy business.

Can a Player change strategy for every hand? Or is it fixed
during a game? In other words if I start a Game of AlanSolitair1
can I play one hand with Strategy1 then play the next with
Strategy2 and then switch back to Strategy1? And how would
the scoring and reporting work in that case?

I'm suspecting that the strategy should be the same for
every set of hands - let's call it a Session? So does that
mean we have another conceptual class - a Session - to
consider. Or is a Session the same as a Game?

What exactly is a Game? - is it a set of rules/plays or is
it just a set of hands? I'm assuming it's the former, in
which case a session is a contiguous set of hands using
the same Game (but possibly different Strategies?)

Or is a Game a set of hands with each hand associated
with a GameType(which holds the rules/plays?) and Strategy?
(Or does a Game/Session only have one GameType?)

There are many ambiguities in the specification. But
those need to be resolved before the database schema
design can be completed.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list