Re: General Opinion on a how to?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Seems to me you need to do some analysis.

Some obvious objects are:

Game
Player
Prize
PrizePool

Now, can you say what state variables and methods these objects should have?
Does thinking about that suggest to you that you may want an inheritance
hierarchy, or an interface for some of these objects? E.g.

Could there be different types of Games (Pool, Poker, Darts, Domines,
Cribbage)? Would they have extra/different state and behaviour?

What about prizes? Would an interface work best here? Then a PrizePool
could hold objects that implement the interface?

Will a Game hold a collection of players? Presumably a PrizePool will hold
a collection of Prizes. Since the Prizes may be different, will they be
different in an inheritance sense, or in an interface sense? Will a
PrizePool need a reference to a Game (i.e. need to know which Game it is the
PrizePool for)? Will a Prize need a reference to a Game, too? Or could the
same Prize be used for many Games.

There's no substitute for good analysis.

HTH, IMHO, YMMV, Just my 2c etc etc


Peter




"Daniel" <nospam@xxxxxxxxxxxxxx> wrote in message
news:O$8rOP6QHHA.4916@xxxxxxxxxxxxxxxxxxxxxxx
Hi guys

I have a requirment to calculate a prize pool for a competiton similar to
a poker tournament. But i am stuck on best ways or even if i have the
right ideas, so:

Players pay to play, total paid is prize pool and is distributed to top 3
or so winners.

Variables are number of players who will win, if a lot enter i increase
number of winners. i think a standard top 30% rounded off would work for
calculating paid positions? So 10 players. 30% would be 3 of them
(rounded)

Now to calculate the actual amount of prize each gets i'd like to be able
to vary it. So i could offer or be versatile enough to offer different
distribtuions. Such as, a winner takes all, a top 2 get the most and then
3rd gets a fair bit less, or a 4 out of 10 get prizes.....etc

Also i'd like to be able to offer prizes where say first place can get
cash AND a car for example. But other 2 places just cash etc etc

This is where i am stuck, do i go for a hard coded table in database and
read off it when my prog loads into a struct and just reference that when
doing calculations? One way forward, but then if a number of players
enters that i havent accounted for, then what?

Alternatively as i said above i calculate winning positions based on a %
but then how do idecide which of those positions wins what?

Very stuck and confused, i keep thinking this must be simple. any ideas or
pointers welcome?

Thanks





.



Relevant Pages

  • Our famous WCN Masters Tournament!!
    ... We are pleased to invite all players over 2300 to join us Saturday ... First prize is $250 USD. ... The time control of each game is 3 minutes per ... Winners of the WCN Masters Tournament can also request their prize to ...
    (rec.games.chess.misc)
  • Re: Will VTES $25,000 prize be next?
    ... bucks by the game" -type of player is the one VTES would really need. ... So as everyone chimes in that a cash prize would ruin VTES, ... lame ass promo stuff to the Top 5 players, end of the line for me. ...
    (rec.games.trading-cards.jyhad)
  • Re: Tacoma storyline
    ... If three players are playing a game, ... >> of the first place prize to B to help him gang up on C, ...
    (rec.games.trading-cards.jyhad)
  • Re: Will VTES $25,000 prize be next?
    ... decided it was a good idea to offer a $25K prize. ... They're offering that level of support because EVE (card game version) ... people can choose to play and spend their money on. ... shadows and draw in new players, why not give it a try? ...
    (rec.games.trading-cards.jyhad)
  • Re: Will VTES $25,000 prize be next?
    ... decided it was a good idea to offer a $25K prize. ... someone who might be playing the game you play for a different reason ... and stop stereotyping players who play for money. ...
    (rec.games.trading-cards.jyhad)