TOC - prev - next - javadoc tree

3.2. Turns

Sequence of Turns

The BusRider Applet lists the Strategies involved in the game, and each is bound to a player. The players take turns in the listed order. (But Bankrupted players are skipped.)

In consecutive games, the players also take turns going first.

Details of a turn

A turn of a player/Strategy proceeds as follows:
  1. The conductor calls the Strategy's beginTurn method.
  2. If the player has no Destination, the conductor picks two, and calls the Strategy's chooseDestination method. The Strategy returns one of them, which becomes the player's Destination; otherwise the conductor picks the first one.
  3. The conductor rolls two dice for the player, or three if he has a Right-of-Way. The total of all dice is the player's roll.
  4. Until the player reaches his Destination or exhausts his roll: If the player reaches his Destination, any remainder of the roll is discarded.
  5. If the player has arrived at his Destination:
    1. The conductor looks-up the payoff for the delivery, and credits the player's cash.
    2. The player's Destination becomes his Origin, and the player no longer has a Destination.
    3. The conductor calls the Strategy's youArrived method, to see what to purchase.
    4. If the Strategy returns a valid Purchase object (see below), the player purchases that item, and his cash is debited. The conductor then calls each Strategy's playerIsFast or transferRoute method, as appropriate.
  6. While the player has negative cash and owns some Routes:
  7. If the player still has negative cash, he is Bankrupted. The conductor calls the Strategy's youAreBroke method.
  8. If the player has no destination (and has therefore just arrived at one), the conductor notes whether the player has enough cash to win.
  9. The conductor calls the Strategy's endTurn method.
  10. If the player has won, or if all players are Bankrupt, the conductor calls each Strategy's endGame method.

Purchases

A Right-of-Way purchase is valid if:

So, you can't stupidly buy a Right-of-Way twice.

A Route purchase is valid if:

A Purchase object is valid if it is a valid Right-of-Way purchase, or a valid Route purchase.

A player may make a purchase only after arriving at a Destination, and then he may purchase only one thing.

A player can spend his cash down to zero. This is legal, but may be a poor idea. If the player must pay a fare before collecting a fare, or reaching his next destination, he will have to sell a Route.

A player cannot spend his cash below zero, even if he has a Route that he wants to sell.

Sales

A player cannot sell a Right-of-Way.

A player can sell only when his cash falls below zero; and that can happen only after paying a fare. When selling, a player may sell any Route that he owns.

When sold, a Route is sold to the bank, never to another player. The sale price is the same as the purchase price.


TOC - prev - next - javadoc tree