courageousillumination / deckr

A Card Game Engine for CMSC 22001
MIT License
6 stars 1 forks source link

Make zones play nice with mulitple players #23

Closed courageousillumination closed 9 years ago

courageousillumination commented 9 years ago

Right now zones won't really work well with multiple players. Since zones are hardcoded in it's possible that a player will be playing upside down or sideways. Zones ought to have a way of dealing with this.

hcourt commented 9 years ago

Sub-issues:

  1. Create the new zone divid system a la "playerZone0" (your zone), "playerZone1" (the person next to you), etc.
  2. Multiplayer next player - a function to get the next player in the multiplayer turn order
  3. fn: gameid -> divid
courageousillumination commented 9 years ago

Are there unittests for this?

grahamas commented 9 years ago

All the subissues are irrelevant, now. Tristan's individualized pushing described in the visibility issue makes most of this easy. The only difficulty now is in changing the region ids at set up. Working on that test now.

grahamas commented 9 years ago

After working through it for a while, Shaan and I realized that the testing part is mostly covered in test_config_with_owners. The rest is in sending the zoneids appropriately, which Shaan is writing a test for right now.

ssapra commented 9 years ago

Since the javascript needs to iterate through the zones based on each player's layout, this data needs to be passed through the sockets which comes from the game runner and game objects. This requires a lot of objects to be mocked and reduces the value of the test, so we will transform this test into an integration test since data passed back and forth between multiple layers.

courageousillumination commented 9 years ago

I think this is all done on the hearts branch.