View Javadoc

1   // START LICENSE
2   // JSet - a Java JSet card board game implementation
3   // Copyright (C) 2004 Jerome Lacoste
4   //
5   // This program is free software; you can redistribute it and/or modify
6   // it under the terms of the GNU General Public License as published by
7   // the Free Software Foundation; either version 2 of the License, or (at
8   // your option) any later version.
9   //
10  // This program is distributed in the hope that it will be useful, but
11  // WITHOUT ANY WARRANTY; without even the implied warranty of
12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  // General Public License for more details.
14  //
15  // You should have received a copy of the GNU General Public License
16  // along with this program; if not, write to the Free Software
17  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18  // END LICENSE
19  
20  package org.cb.jset.client.model;
21  
22  import org.cb.jset.CardProperties;
23  import org.cb.jset.CardSet;
24  import org.cb.jset.BoardException;
25  
26  /***
27   * Interface that SetGameClientBoard implementations must inherit from.
28   *
29   * @author jerome@coffeebreaks.org - last modified by $LastModifiedBy$
30   * @version $Id: SetGameClientBoard.java 119 2004-04-14 23:20:09Z jerome $
31   */
32  public interface SetGameClientBoard
33  {
34    /***
35     * @return the number of cards on the board.
36     */
37    int getNbCards();
38    /***
39     * Add the specified cards onto the board.
40     * @param cards the cards to add.
41     * @throws NullPointerException if <code>cards</code> is <code>null</code> or if an element in the array is <code>null</code>.
42     */
43    void addCards(CardProperties[] cards);
44    /***
45     * Remove the specified matching set from the board.
46     * @param set the set to remove
47     * @throws BoardException when something fails
48     */
49    void removeSet(CardSet set) throws BoardException;
50  }