OOP Question

new topic     » topic index » view thread      » older message » newer message

I'm putting together this game, and I'm curious about the best way to go on
something... Ralf, you may have some particularly relevant insight on this
considering your PixelBot work...

The players will be controlling pieces on a board. There are two ways to
track their position:

1. The GAME object or PLAYFIELD object monitors/tracks the piece position,
and the pieces query the playfield object for their position, OR
2. The PIECES monitor/track their own position, and the GAME object or
PLAYFIELD object queries the piece for its position.

The first one is what I'm thinking is best, because the pieces' position is
irrelevant outside the context of a playfield!

The second one just doesn't sound right, but maybe I'm missing some logic
here.

Any helpful insight is appreciated.

-ck

P.S. I've got it set up so the game itself is an object, within which you'll
find a playfield, pieces, players, etc... all interacting in the environment
of the game.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu