FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Board.java




Interface for my Sungka package.

Code:


//Declare package
package htwx.cay;

/**
 *<p><strong>Board</strong> - Interface used to for implementing a Sungka board.
 * This class contains 4 methods, namely: createBoard(), displayBoard(), move() and isEmpty().
 * Read further to see more in detail.</p>
 *<p>See {@link Sungka} for implementation.</p>
 * @author Acezon Cay
 */
public interface Board {
   /**
    * createBoard is an interface for initializing a Sungka board.
    */
   public void createBoard();

   /**
    * displayBoard is an interface for displaying a Sungka board.
    */
   public void displayBoard();

   /**
    * move is an interface for the movement algorithm in Sungka.
    * @param choice A data of type int.
    * @return {@code true} or {@code false} - True when signifying that the game ended, otherwise continue.
    */
   public boolean move(int choice);

   /**
    * isEmpty is an interface for checking if a chosen board is empty.
    * @param board A array of type int.
    * @return {@code true} or {@code false} - True when the chosen board is empty, otherwise false.
    */
   public boolean isEmpty(int[] board);
}




0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.