Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## glassfrog.players
Class SeatComparator

    java.lang.Object
      glassfrog.players.SeatComparator

All Implemented Interfaces:
  java.util.Comparator<Player>

    public class SeatComparator

extends java.lang.Object
implements java.util.Comparator<Player>

Compares the positions of the players. Position 0 is first to act

Author:
  jdavidso

Constructor Summary
`SeatComparator()`

Method Summary
`int` | `compare(Player o1, Player o2)` Compares the seats of the players.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Comparator
`equals`

Constructor Detail

### SeatComparator

    public SeatComparator()

Method Detail

### compare

    public int compare(Player o1,
                       Player o2)

  Compares the seats of the players. Used to sort the players by thier seat

  Specified by:
    `compare` in interface `java.util.Comparator<Player>`
  Parameters:
    `o1` - Player 1
    `o2` - Player 2
  Returns:
    0 for a tie, Negative if Player 1 acts before Player 2 and Positive if Player 2 acts before Player 1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD