Guest User

Untitled

a guest
Mar 21st, 2011
701
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Board {
  2.     private Card[] board = new Card[5];
  3.     private Card[] burnCards = new Card[3];
  4.    
  5.     //constructor
  6.     public Board(){
  7.     }
  8.    
  9.     //methods
  10.     protected void setBoardCard(Card card, int cardNum){
  11.         this.board[cardNum] = card;
  12.     }
  13.    
  14.     protected Card getBoardCard(int cardNum){
  15.         return this.board[cardNum];
  16.     }
  17.    
  18.     protected void setBurnCard(Card card, int cardNum){
  19.         this.burnCards[cardNum] = card;
  20.     }
  21.    
  22.     protected Card getBurnCard(int cardNum){
  23.         return this.burnCards[cardNum];
  24.     }
  25.    
  26.     protected int boardSize(){
  27.         return board.length;
  28.     }
  29.    
  30.     protected void printBoard(){
  31.         System.out.println("The board contains the following cards:");
  32.         for(int i =0; i<board.length;i++){
  33.             System.out.println(i+1 + ": " + getBoardCard(i).printCard());
  34.         }
  35.         System.out.println("\n");
  36.     }
  37.    
  38.     protected void printBurnCards(){
  39.         System.out.println("The burn cards are:");
  40.         for(int i =0; i<burnCards.length;i++){
  41.             System.out.println(i+1 + ": " + getBurnCard(i).printCard());
  42.         }
  43.         System.out.println("\n");
  44.     }
  45.  
  46. }
RAW Paste Data