jagafa.object
Class Board

java.lang.Object
  extended by jagafa.object.CardList
      extended by jagafa.object.Board

public class Board
extends CardList

The Board object holds alls the cards played including the information which Player played which Card (Is also a CardList)


Constructor Summary
Board()
          Constructor: Init the board and init playerList
Board(Board b)
          Copy Constructor: Init the board and init playerList
 
Method Summary
 void addCard(Card c, Player p)
          Adds a Card to the Board
 int cardsPlayed()
          Get the number of cards on the board
 void clearBoard()
          Clear the Board
 Card getFirstCard()
          Get the first card played
 int getFirstColor()
          Get the color of the first card played
 Player getPlayerOfPos(int pos)
          Get the Player who played the n-th card
 
Methods inherited from class jagafa.object.CardList
add, addAll, clear, contains, get, getGoneOfColor, isEmpty, iterator, list, remove, remove, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Board

public Board()
Constructor: Init the board and init playerList


Board

public Board(Board b)
Copy Constructor: Init the board and init playerList

Parameters:
b - The board to copy
Method Detail

addCard

public void addCard(Card c,
                    Player p)
Adds a Card to the Board

Parameters:
c - The card to add
p - The player which played the card

clearBoard

public void clearBoard()
Clear the Board


cardsPlayed

public int cardsPlayed()
Get the number of cards on the board

Returns:
The number of Cards played

getPlayerOfPos

public Player getPlayerOfPos(int pos)
Get the Player who played the n-th card

Parameters:
pos - The position of the card
Returns:
The Player who played the n-th card

getFirstColor

public int getFirstColor()
Get the color of the first card played

Returns:
The color of the first card on the Board

getFirstCard

public Card getFirstCard()
Get the first card played

Returns:
The first card on the Board


Copyright 2005 MA Software. All Rights Reserved.