soc.game
Class SOCMoveRobberResult

java.lang.Object
  extended bysoc.game.SOCMoveRobberResult

public class SOCMoveRobberResult
extends java.lang.Object

This class holds the results of moving the robber. Specificaly, the victim or possible victims, and what was stolen.


Field Summary
(package private)  int loot
          Resource type of loot stolen, as in SOCResourceConstants, or -1
(package private)  java.util.Vector victims
          Victim, or possible victims, or empty or null; content type SOCPlayer
 
Constructor Summary
SOCMoveRobberResult()
          Creates a new SOCMoveRobberResult object.
 
Method Summary
 int getLoot()
          Get the type of resource stolen from the victim; undefined unless getVictims().size() == 1.
 java.util.Vector getVictims()
          Get the victim (if any) or possible victims
 void setLoot(int l)
          Set the type of resource stolen from the victim
 void setVictims(java.util.Vector v)
          Set the victim (if any) or possible victims
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

victims

java.util.Vector victims
Victim, or possible victims, or empty or null; content type SOCPlayer


loot

int loot
Resource type of loot stolen, as in SOCResourceConstants, or -1

Constructor Detail

SOCMoveRobberResult

public SOCMoveRobberResult()
Creates a new SOCMoveRobberResult object.

Method Detail

setVictims

public void setVictims(java.util.Vector v)
Set the victim (if any) or possible victims

Parameters:
v - Victim or possible victims, may be empty or null; Vector of SOCPlayer

getVictims

public java.util.Vector getVictims()
Get the victim (if any) or possible victims

Returns:
Victim or possible victims, may be empty or null; Vector of SOCPlayer

setLoot

public void setLoot(int l)
Set the type of resource stolen from the victim

Parameters:
l - type of resource stolen, as in SOCResourceConstants, or -1 if nothing stolen

getLoot

public int getLoot()
Get the type of resource stolen from the victim; undefined unless getVictims().size() == 1.

Returns:
type of resource stolen, as in SOCResourceConstants, or -1 if nothing stolen