Overview |
Package |
Class |
Tree |
Index |
Help |
|
|
SUMMARY: FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |
Class YahtzeeMagicStub
java.lang.Object
|
+--YahtzeeMagicStub
public class YahtzeeMagicStub
The YahtzeeMagicStub class exists only to make it
easier for you to get the Yahtzee game working. It exports a single static method
named checkCategory
that tests whether an array of dice matches a category. You should rewrite this method and
not call this version in your final program.
Method Summary |
boolean |
checkCategory(int[] dice,
int category)
Checks to see whether the dice array fits the category. |
public static boolean checkCategory(int[] dice,
int category)
- Checks to see whether the dice array fits the category. This
method is provided only as a temporary expedient to help you
get your program working. Your final program should not call
this method.
-
Usage: | if (YahtzeeMagicStub.checkCategory(dice, category)) . . . |
Parameters: |
dice | An array of dice values, whose indices range from 0 to N_DICE - 1
|
category | The category number, as defined in YahtzeeConstants |
|
Returns: | true if the dice fit the category, and false otherwise
|
Overview |
Package |
Class |
Tree |
Index |
Help |
|
|
SUMMARY: FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |