← Back to team overview

millennium-dev team mailing list archive

[Bug 1205817] Re: The Game is a static class

 

Reasons why the Game class should be instantiable:
 - Cards whose effect needs interacting with the game as whole might be able to simply call Game's methods using the reference they are given. This will become crucial in the far future when we pack card classes into separate .dll/.so libraries, then they won't be able to use static class defined outside of them (linking would fail).
 - If the Game class is static, there is no way to host multiple duels on a single server.

Reasons why the Game class should be static:
  [I do not know any.]

-- 
You received this bug notification because you are a member of
Millennium Developers, which is subscribed to libMillennium.
https://bugs.launchpad.net/bugs/1205817

Title:
  The Game is a static class

Status in libMillennium:
  Triaged

Bug description:
  When implementing connection scheme, I, mistakingly, made the Game a
  static class.

  It should be instantiable, with both CPlayers maintaining a reference
  to it.

  (Currently it does not matter much, CPlayer can use the static class
  as it wishes, but when we'll expand card collection, it may be useful
  to be able to pass a Game reference to card's code.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/libmillennium/+bug/1205817/+subscriptions


References