de.kosi.model.game
Class SuitContract

java.lang.Object
  |
  +--de.kosi.model.game.Contract
        |
        +--de.kosi.model.game.SuitContract
All Implemented Interfaces:
java.io.Serializable

public class SuitContract
extends Contract

A contract to play a suit.

ChangeLog:

 
 $Log: SuitContract.java,v $
 Revision 1.2  2001/06/13 12:30:05  jiriki
 Worked on Game/TableView

 Revision 1.1.1.1  2001/04/29 18:05:18  jiriki
 Imported sources from zola.

 Revision 1.5  2001/03/22 16:40:47  wombat
 - Updated ant to 1.3
 - Removed bugs in GameImpl and StressClient

 Revision 1.4  2001/03/15 19:19:48  login
 Worked on GameImpl to make it possible that the declarer plays the dummy's cards
 and prohibit that the dummy does anything.

 Revision 1.3  2001/03/05 20:55:22  login
 - Game (und zugehoerige Klassen) soweit fertig
 - package de.kosi.model.tournament angelegt
 - Pair angelegt
 - Round angelegt
 - Movement-Interface angelegt
 - KosiMovement fertig!!! :-)
 - KosiMovementTest um das KosiMovement zu testen
       (kann mit KOSI/kosimovementtest  aufgerufen werden)
 - Tournament und TournamentImpl in das package de.kosi.model.tournament
       verschoben
 - buildfile fuer die neuen klassen angepasst

 Revision 1.2  2001/02/27 14:43:14  wombat
 Updated documentation.

 

Version:
$Revision: 1.2 $ ($Date: 2001/06/13 12:30:05 $)
Author:
Timo, Niklas, Ole
See Also:
Serialized Form

Constructor Summary
SuitContract(SuitBid suit, boolean doubled, boolean redoubled, int declarer)
          Create a new SuitContract.
 
Method Summary
 int getDeclarer()
          Return the declarer of this contract.
 int getDummy()
          Returns the direction of the dummy.
 SuitBid getSuitBid()
          Return the suit of this contract.
 boolean isDoubled()
          Return wether this contract has been doubled.
 boolean isRedoubled()
          Return wether this contract has been redoubled.
 java.lang.String toString()
          Returns a String representation of the contract.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuitContract

public SuitContract(SuitBid suit,
                    boolean doubled,
                    boolean redoubled,
                    int declarer)
Create a new SuitContract.
Parameters:
suit - Suit (and heigth) to play.
doubled - Wether this contract has been doubled.
redoubled - Wether this contract has been redoubled.
declarer - Declarer of this contract.
Method Detail

getSuitBid

public SuitBid getSuitBid()
Return the suit of this contract.
Returns:
SuitBid containing the suit and height of the contract.

isDoubled

public boolean isDoubled()
Return wether this contract has been doubled.
Returns:
true if doubled.

isRedoubled

public boolean isRedoubled()
Return wether this contract has been redoubled.
Returns:
true if redoubled.

getDeclarer

public int getDeclarer()
Return the declarer of this contract.
Returns:
declarer of this contract (Player.NORTH, SOUTH, EAST, WEST)

getDummy

public int getDummy()
Returns the direction of the dummy.
Returns:
A player direction constant (NORTH, EAST, SOUTH, WEST).

toString

public java.lang.String toString()
Returns a String representation of the contract.
Overrides:
toString in class java.lang.Object
Returns:
String representation.