End the turn automatically if a player has no playable piecens after they
place their tile. git-svn-id: https://samskivert.googlecode.com/svn/trunk@373 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: AtlantiManager.java,v 1.12 2001/10/17 23:28:34 mdb Exp $
|
||||
// $Id: AtlantiManager.java,v 1.13 2001/10/18 02:19:24 mdb Exp $
|
||||
|
||||
package com.threerings.venison;
|
||||
|
||||
@@ -598,6 +598,13 @@ public class VenisonManager
|
||||
|
||||
Log.info("Placed tile " + tile + ".");
|
||||
|
||||
// now determine if this player has any free piecens
|
||||
int pidx = getTurnHolderIndex();
|
||||
int pcount = TileUtil.countPiecens(_tiles, pidx);
|
||||
if (pcount >= PIECENS_PER_PLAYER) {
|
||||
endTurn();
|
||||
}
|
||||
|
||||
} else {
|
||||
Log.warning("Received invalid placement " + event + ".");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user