sIKE23 / Mage-Wars

Mage Wars for OCTGN
7 stars 5 forks source link

Allow player who did not win ini the choice of start zones #310

Open sIKE23 opened 8 years ago

sIKE23 commented 8 years ago

@ACG I have this in my head as easy for two and harder for three or more players.

Very simple for 2 players but three gets a bit more convoluted. We could use OppIniRoll, but that will not cover things in the event of a tie.

Any ideas?

ACG8 commented 8 years ago

Here is what we need to do (for more than just this problem):

Initialization

  1. At the start of the game, determine a player order consisting of a list of player ids. The player who rolls highest will choose the player order with a choice box that updates itself after each choice. Store this list as a string in a global variable.
  2. In reverse player order, present each player with a choice of starting zones consisting of the zones that have not been taken. We can store each player's starting zone in the map object (which will require some changes to handle issues like two players starting in the same zone). We can also update the map object after each player chooses to make sure that the next player only sees the remaining available start zones.

Update

  1. At the start of each round, remove the first element of the player order list and then append it to the end of the list.
sIKE23 commented 8 years ago

Why update the list at each round?

ACG8 commented 8 years ago

Because initiative is passed each round. The order of the elements of the list tells you the order in which players act/reveal enchantments/etc. So the first element of the list should be moved to the end after each round to update player turn order.