CardGame/.classpath
CardGame/.project
CardGame
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
CardGame/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
CardGame/bin/client/SimpleTestClient.class
package client;
public synchronized class SimpleTestClient {
private static java.util.logging.Logger logger;
static void ();
public void SimpleTestClient();
public static void main(String[]);
private static void printCards(java.util.Deque);
}
CardGame/bin/model/interfaces/GameEngine.class
package model.interfaces;
public abstract interface GameEngine {
public static final int BUST_LEVEL = 21;
public abstract void dealPlayer(Player, int);
public abstract void dealHouse(int);
public abstract void addPlayer(Player);
public abstract Player getPlayer(String);
public abstract boolean removePlayer(Player);
public abstract void addGameEngineCallback(view.interfaces.GameEngineCallback);
public abstract boolean removeGameEngineCallback(view.interfaces.GameEngineCallback);
public abstract java.util.Collection getAllPlayers();
public abstract boolean placeBet(Player, int);
public abstract java.util.Deque getShuffledDeck();
}
CardGame/bin/model/interfaces/Player.class
package model.interfaces;
public abstract interface Player {
public abstract String getPlayerName();
public abstract void setPlayerName(String);
public abstract int getPoints();
public abstract void setPoints(int);
public abstract String getPlayerId();
public abstract boolean placeBet(int);
public abstract int getBet();
public abstract void resetBet();
public abstract int getResult();
public abstract void setResult(int);
public abstract String toString();
}
CardGame/bin/model/interfaces/PlayingCard$Suit.class
package model.interfaces;
public final synchronized enum PlayingCard$Suit {
public static final PlayingCard$Suit HEARTS;
public static final PlayingCard$Suit SPADES;
public static final PlayingCard$Suit CLUBS;
public static final PlayingCard$Suit DIAMONDS;
static void ();
private void PlayingCard$Suit(String, int);
public static PlayingCard$Suit[] values();
public static PlayingCard$Suit valueOf(String);
}
CardGame/bin/model/interfaces/PlayingCard$Value.class
package model.interfaces;
public final synchronized enum PlayingCard$Value {
public static final PlayingCard$Value ACE;
public static final PlayingCard$Value TWO;
public static final PlayingCard$Value THREE;
public static final PlayingCard$Value FOUR;
public static final PlayingCard$Value FIVE;
public static final PlayingCard$Value SIX;
public static final PlayingCard$Value SEVEN;
public static final PlayingCard$Value EIGHT;
public static final PlayingCard$Value NINE;
public static final PlayingCard$Value TEN;
public static final PlayingCard$Value JACK;
public static final PlayingCard$Value QUEEN;
public static final PlayingCard$Value KING;
static void ();
private void PlayingCard$Value(String, int);
public static PlayingCard$Value[] values();
public static PlayingCard$Value valueOf(String);
}
CardGame/bin/model/interfaces/PlayingCard.class
package model.interfaces;
public abstract interface PlayingCard {
public static final int DECK_SIZE = 52;
public abstract PlayingCard$Suit getSuit();
public abstract PlayingCard$Value getValue();
public abstract int getScore();
public abstract String toString();
public abstract boolean equals(PlayingCard);
}
CardGame/bin/validate/Validator.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
validate/PlayerImpl.class
package validate;
public synchronized class PlayerImpl implements model.interfaces.Player {
public void PlayerImpl();
public String getPlayerName();
public void setPlayerName(String);
public int getPoints();
public void setPoints(int);
public String getPlayerId();
public boolean placeBet(int);
public int getBet();
public void resetBet();
public int getResult();
public void setResult(int);
}
validate/GECImpl.class
package validate;
public synchronized class GECImpl implements view.interfaces.GameEngineCallback {
public void GECImpl();
public void nextCard(model.interfaces.Player, model.interfaces.PlayingCard, model.interfaces.GameEngine);
public void bustCard(model.interfaces.Player, model.interfaces.PlayingCard, model.interfaces.GameEngine);
public void result(model.interfaces.Player, int, model.interfaces.GameEngine);
public void nextHouseCard(model.interfaces.PlayingCard, model.interfaces.GameEngine);
public void houseBustCard(model.interfaces.PlayingCard, model.interfaces.GameEngine);
public void houseResult(int, model.interfaces.GameEngine);
}
validate/CardImpl.class
package validate;
public synchronized class CardImpl implements model.interfaces.PlayingCard {
public void CardImpl();
public model.interfaces.PlayingCard$Suit getSuit();
public model.interfaces.PlayingCard$Value getValue();
public int getScore();
public boolean equals(model.interfaces.PlayingCard);
}
validate/Validator$ValidationException.class
package validate;
public synchronized class Validator$ValidationException extends RuntimeException {
public void Validator$ValidationException(String);
}
validate/Validator.class
package validate;
public synchronized class Validator {
private static final String FAIL_MSG =
You are either not implementing a required interface, have modified it,
or have one or more non-private methods that are not part of the Specification;
private static final String SYNTHETIC_ACCESSOR = access$;
private static final String SWITCH_TABLE = $SWITCH_TABLE;
private static final String[] IGNORED_TOKENS;
static void
();
public void Validator();
public static void validate(boolean);
private static void validateImpl(Class, Class, boolean) throws Validator$ValidationException;
private static String unqualifyMethodName(String);
private static java.util.Set createSortedSetOfNonPrivateMethodsForClass(Class);
private static boolean ignoreMethod(reflect.Method);
private static void addAllDeclaredMethods(java.util.Set, Class);
}
validate/GEImpl.class
package validate;
public synchronized class GEImpl implements model.interfaces.GameEngine {
public void GEImpl();
public void dealPlayer(model.interfaces.Player, int);
public void dealHouse(int);
public void addPlayer(model.interfaces.Player);
public model.interfaces.Player getPlayer(String);
public boolean removePlayer(model.interfaces.Player);
public void addGameEngineCallback(view.interfaces.GameEngineCallback);
public boolean removeGameEngineCallback(view.interfaces.GameEngineCallback);
public java.util.Collection getAllPlayers();
public boolean placeBet(model.interfaces.Player, int);
public java.util.Deque getShuffledDeck();
}
CardGame/bin/view/GameEngineCallbackImpl.class
package view;
public synchronized class GameEngineCallbackImpl implements interfaces.GameEngineCallback {
private final java.util.logging.Logger logger;
public void GameEngineCallbackImpl();
public void nextCard(model.interfaces.Player, model.interfaces.PlayingCard, model.interfaces.GameEngine);
public void result(model.interfaces.Player, int, model.interfaces.GameEngine);
}
CardGame/bin/view/interfaces/GameEngineCallback.class
package view.interfaces;
public abstract interface GameEngineCallback {
public abstract void nextCard(model.interfaces.Player, model.interfaces.PlayingCard, model.interfaces.GameEngine);
public abstract void bustCard(model.interfaces.Player, model.interfaces.PlayingCard, model.interfaces.GameEngine);
public abstract void result(model.interfaces.Player, int, model.interfaces.GameEngine);
public abstract void nextHouseCard(model.interfaces.PlayingCard, model.interfaces.GameEngine);
public abstract void houseBustCard(model.interfaces.PlayingCard, model.interfaces.GameEngine);
public abstract void houseResult(int, model.interfaces.GameEngine);
}
CardGame/docs/allclasses-frame.html
All Classes
GameEngine
GameEngineCallback
Player
PlayingCard
PlayingCard.Suit
PlayingCard.Value
CardGame/docs/allclasses-noframe.html
All Classes
GameEngine
GameEngineCallback
Player
PlayingCard
PlayingCard.Suit
PlayingCard.Value
CardGame/docs/constant-values.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Constant Field Values
Contents
model.interfaces.*
model.interfaces.*
model.interfaces.GameEngine Modifier and Type Constant Field Value
public static final int BUST_LEVEL 21
model.interfaces.PlayingCard Modifier and Type Constant Field Value
public static final int DECK_SIZE 52
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/deprecated-list.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Deprecated API
Contents
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/help-doc.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
How This API Document Is Organized
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
Overview
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
Package
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
Interfaces (italic)
Classes
Enums
Exceptions
Errors
Annotation Types
Class/Interface
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
Class inheritance diagram
Direct Subclasses
All Known Subinterfaces
All Known Implementing Classes
Class/interface declaration
Class/interface description
Nested Class Summary
Field Summary
Constructor Summary
Method Summary
Field Detail
Constructor Detail
Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
Annotation Type
Each annotation type has its own separate page with the following sections:
Annotation Type declaration
Annotation Type description
Required Element Summary
Optional Element Summary
Element Detail
Enum
Each enum has its own separate page with the following sections:
Enum declaration
Enum description
Enum Constant Summary
Enum Constant Detail
Use
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
Tree (Class Hierarchy)
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
Deprecated API
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
Index
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
Prev/Next
These links take you to the next or previous class, interface, package, or related page.
Frames/No Frames
These links show and hide the HTML frames. All pages are available with or without frames.
All Classes
The All Classes link shows all classes and interfaces except non-static nested types.
Serialized Form
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
Constant Field Values
The Constant Field Values page lists the static final fields and their values.
This help file applies to API documentation generated using the standard doclet.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/index-files/index-1.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
A
addGameEngineCallback(GameEngineCallback) - Method in interface model.interfaces.GameEngine
addPlayer(Player) - Method in interface model.interfaces.GameEngine
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-10.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
R
removeGameEngineCallback(GameEngineCallback) - Method in interface model.interfaces.GameEngine
removePlayer(Player) - Method in interface model.interfaces.GameEngine
resetBet() - Method in interface model.interfaces.Player
reset the bet to 0 for next round (in case player does not bet again in next round)
result(Player, int, GameEngine) - Method in interface view.interfaces.GameEngineCallback
called when the player has bust with final result (result is score prior
to the last card that caused the bust)
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-11.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
S
setPlayerName(String) - Method in interface model.interfaces.Player
setPoints(int) - Method in interface model.interfaces.Player
setResult(int) - Method in interface model.interfaces.Player
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-12.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
T
toString() - Method in interface model.interfaces.Player
toString() - Method in interface model.interfaces.PlayingCard
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-13.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
V
valueOf(String) - Static method in enum model.interfaces.PlayingCard.Suit
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum model.interfaces.PlayingCard.Value
Returns the enum constant of this type with the specified name.
values() - Static method in enum model.interfaces.PlayingCard.Suit
Returns an array containing the constants of this enum type, in
the order they are declared.
values() - Static method in enum model.interfaces.PlayingCard.Value
Returns an array containing the constants of this enum type, in
the order they are declared.
view.interfaces - package view.interfaces
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-2.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
B
BUST_LEVEL - Static variable in interface model.interfaces.GameEngine
bustCard(Player, PlayingCard, GameEngine) - Method in interface view.interfaces.GameEngineCallback
called when the card causes the player to bust
this method is called instead of GameEngineCallback.nextCard(Player, PlayingCard, GameEngine)
this method is called before GameEngineCallback.result(Player, int, GameEngine)
use this to update your display for each card or log to console
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-3.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
D
dealHouse(int) - Method in interface model.interfaces.GameEngine
Same as dealPlayer() but deals for the house and calls the house versions
of the callback methods on GameEngineCallback, no player parameter is
required
After the house deal has finished but BEFORE calling houseResult() win/loss values
are applied to all players based on their bet
dealPlayer(Player, int) - Method in interface model.interfaces.GameEngine
Deal cards to the player, increments of delay are in milliseconds (ms)
1.
DECK_SIZE - Static variable in interface model.interfaces.PlayingCard
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-4.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
E
equals(PlayingCard) - Method in interface model.interfaces.PlayingCard
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-5.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
G
GameEngine - Interface in model.interfaces
Assignment interface for SADI providing main Card Game model functionality
GameEngineCallback - Interface in view.interfaces
Assignment interface for SADI to notify client of GameEngine events e.g.
getAllPlayers() - Method in interface model.interfaces.GameEngine
getBet() - Method in interface model.interfaces.Player
getPlayer(String) - Method in interface model.interfaces.GameEngine
getPlayerId() - Method in interface model.interfaces.Player
getPlayerName() - Method in interface model.interfaces.Player
getPoints() - Method in interface model.interfaces.Player
getResult() - Method in interface model.interfaces.Player
getScore() - Method in interface model.interfaces.PlayingCard
getShuffledDeck() - Method in interface model.interfaces.GameEngine
A debug method to return a deck of cards containing 52 unique cards in
random/shuffled order
getSuit() - Method in interface model.interfaces.PlayingCard
getValue() - Method in interface model.interfaces.PlayingCard
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-6.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
H
houseBustCard(PlayingCard, GameEngine) - Method in interface view.interfaces.GameEngineCallback
HOUSE version of
GameEngineCallback.bustCard(Player, PlayingCard, GameEngine)
houseResult(int, GameEngine) - Method in interface view.interfaces.GameEngineCallback
called when the HOUSE has bust with final result (result is score prior to the last card
that caused the bust)
PRE-CONDITION: This method should only be called AFTER bets have been updated on all Players
so this callback can log Player results
Called from dealHouse(int)
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-7.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
M
model.interfaces - package model.interfaces
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-8.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
N
nextCard(Player, PlayingCard, GameEngine) - Method in interface view.interfaces.GameEngineCallback
called for each card as the house is dealing to a Player, use this to
update your display for each card or log to console
nextHouseCard(PlayingCard, GameEngine) - Method in interface view.interfaces.GameEngineCallback
called as the house is dealing their own hand, use this to update your
display for each card or log to console
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index-files/index-9.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A B D E G H M N P R S T V
P
placeBet(Player, int) - Method in interface model.interfaces.GameEngine
the implementation should forward the call to the Player class to handle
placeBet(int) - Method in interface model.interfaces.Player
Player - Interface in model.interfaces
Assignment interface for SADI representing the player
to be implemented by SimplePlayer class with the following constructor:
public SimplePlayer(String playerId, String playerName, int initialPoints)
NOTE: playerID is unique and if another player with same id is added it replaces the previous player
PlayingCard - Interface in model.interfaces
Assignment interface for SADI representing a PlayingCard
(setting values is handled by the implementing class constructor(s))
PlayingCard.Suit - Enum in model.interfaces
PlayingCard.Value - Enum in model.interfaces
A B D E G H M N P R S T V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
CardGame/docs/index.html
CardGame/docs/model/interfaces/class-use/GameEngine.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Interface
model.interfaces.GameEngine
Packages that use GameEngine Package Description
view.interfaces
Uses of GameEngine in view.interfaces
Methods in view.interfaces with parameters of type GameEngine Modifier and Type Method and Description
void GameEngineCallback.bustCard(Player player,
PlayingCard card,
GameEngine engine)
called when the card causes the player to bust
this method is called instead of GameEngineCallback.nextCard(Player, PlayingCard, GameEngine)
this method is called before GameEngineCallback.result(Player, int, GameEngine)
use this to update your display for each card or log to console
void GameEngineCallback.houseBustCard(PlayingCard card,
GameEngine engine)
HOUSE version of
GameEngineCallback.bustCard(Player, PlayingCard, GameEngine)
void GameEngineCallback.houseResult(int result,
GameEngine engine)
called when the HOUSE has bust with final result (result is score prior to the last card
that caused the bust)
PRE-CONDITION: This method should only be called AFTER bets have been updated on all Players
so this callback can log Player results
Called from dealHouse(int)
void GameEngineCallback.nextCard(Player player,
PlayingCard card,
GameEngine engine)
called for each card as the house is dealing to a Player, use this to
update your display for each card or log to console
void GameEngineCallback.nextHouseCard(PlayingCard card,
GameEngine engine)
called as the house is dealing their own hand, use this to update your
display for each card or log to console
void GameEngineCallback.result(Player player,
int result,
GameEngine engine)
called when the player has bust with final result (result is score prior
to the last card that caused the bust)
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/model/interfaces/class-use/GameEngineCallback.html
JavaScript is disabled on your browser.
Skip navigation links
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Interface
model.interfaces.GameEngineCallback
Uses of GameEngineCallback in model.interfaces
Methods in model.interfaces with parameters of type GameEngineCallback Modifier and Type Method and Description
void GameEngine.addGameEngineCallback(GameEngineCallback gameEngineCallback)
boolean GameEngine.removeGameEngineCallback(GameEngineCallback gameEngineCallback)
Skip navigation links
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/model/interfaces/class-use/Player.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Interface
model.interfaces.Player
Packages that use Player Package Description
model.interfaces
view.interfaces
Uses of Player in model.interfaces
Methods in model.interfaces that return Player Modifier and Type Method and Description
Player GameEngine.getPlayer(java.lang.String id)
Methods in model.interfaces that return types with arguments of type Player Modifier and Type Method and Description
java.util.Collection GameEngine.getAllPlayers()
Methods in model.interfaces with parameters of type Player Modifier and Type Method and Description
void GameEngine.addPlayer(Player player)
void GameEngine.dealPlayer(Player player,
int delay)
Deal cards to the player, increments of delay are in milliseconds (ms)
1.
boolean GameEngine.placeBet(Player player,
int bet)
the implementation should forward the call to the Player class to handle
boolean GameEngine.removePlayer(Player player)
Uses of Player in view.interfaces
Methods in view.interfaces with parameters of type Player Modifier and Type Method and Description
void GameEngineCallback.bustCard(Player player,
PlayingCard card,
GameEngine engine)
called when the card causes the player to bust
this method is called instead of GameEngineCallback.nextCard(Player, PlayingCard, GameEngine)
this method is called before GameEngineCallback.result(Player, int, GameEngine)
use this to update your display for each card or log to console
void GameEngineCallback.nextCard(Player player,
PlayingCard card,
GameEngine engine)
called for each card as the house is dealing to a Player, use this to
update your display for each card or log to console
void GameEngineCallback.result(Player player,
int result,
GameEngine engine)
called when the player has bust with final result (result is score prior
to the last card that caused the bust)
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/model/interfaces/class-use/PlayingCard.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Interface
model.interfaces.PlayingCard
Packages that use PlayingCard Package Description
model.interfaces
view.interfaces
Uses of PlayingCard in model.interfaces
Methods in model.interfaces that return types with arguments of type PlayingCard Modifier and Type Method and Description
java.util.Deque GameEngine.getShuffledDeck()
A debug method to return a deck of cards containing 52 unique cards in
random/shuffled order
Methods in model.interfaces with parameters of type PlayingCard Modifier and Type Method and Description
boolean PlayingCard.equals(PlayingCard card)
Uses of PlayingCard in view.interfaces
Methods in view.interfaces with parameters of type PlayingCard Modifier and Type Method and Description
void GameEngineCallback.bustCard(Player player,
PlayingCard card,
GameEngine engine)
called when the card causes the player to bust
this method is called instead of GameEngineCallback.nextCard(Player, PlayingCard, GameEngine)
this method is called before GameEngineCallback.result(Player, int, GameEngine)
use this to update your display for each card or log to console
void GameEngineCallback.houseBustCard(PlayingCard card,
GameEngine engine)
HOUSE version of
GameEngineCallback.bustCard(Player, PlayingCard, GameEngine)
void GameEngineCallback.nextCard(Player player,
PlayingCard card,
GameEngine engine)
called for each card as the house is dealing to a Player, use this to
update your display for each card or log to console
void GameEngineCallback.nextHouseCard(PlayingCard card,
GameEngine engine)
called as the house is dealing their own hand, use this to update your
display for each card or log to console
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/model/interfaces/class-use/PlayingCard.Suit.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Class
model.interfaces.PlayingCard.Suit
Packages that use PlayingCard.Suit Package Description
model.interfaces
Uses of PlayingCard.Suit in model.interfaces
Methods in model.interfaces that return PlayingCard.Suit Modifier and Type Method and Description
PlayingCard.Suit PlayingCard.getSuit()
static PlayingCard.Suit PlayingCard.Suit.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
static PlayingCard.Suit[] PlayingCard.Suit.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/model/interfaces/class-use/PlayingCard.Value.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Class
model.interfaces.PlayingCard.Value
Packages that use PlayingCard.Value Package Description
model.interfaces
Uses of PlayingCard.Value in model.interfaces
Methods in model.interfaces that return PlayingCard.Value Modifier and Type Method and Description
PlayingCard.Value PlayingCard.getValue()
static PlayingCard.Value PlayingCard.Value.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
static PlayingCard.Value[] PlayingCard.Value.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
CardGame/docs/model/interfaces/GameEngine.html
JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Class
Next Class
Frames
No Frames
All Classes
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method
model.interfaces
Interface GameEngine
public interface GameEngine
Assignment interface for SADI providing main Card Game model functionality
Author:
Caspar Ryan
Field Summary
Fields Modifier and Type Field and Description
static int BUST_LEVEL
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description
void addGameEngineCallback(GameEngineCallback gameEngineCallback)
void addPlayer(Player player)
void dealHouse(int delay)
Same as dealPlayer() but deals for the house and calls the house versions
of the callback methods on GameEngineCallback, no player parameter is
required
After the house deal has finished but BEFORE calling houseResult() win/loss values
are applied to all players based on their bet
void dealPlayer(Player player,
int delay)
Deal cards to the player, increments of delay are in milliseconds (ms)
1.
java.util.Collection getAllPlayers()
Player getPlayer(java.lang.String id)
java.util.Deque getShuffledDeck()
A debug method to return a deck of cards containing 52 unique cards in
random/shuffled order
boolean placeBet(Player player,
int bet)
the implementation should forward the call to the Player class to handle
boolean removeGameEngineCallback(GameEngineCallback gameEngineCallback)
boolean removePlayer(Player player)
Field Detail
BUST_LEVEL
static final int BUST_LEVEL
See Also:
Constant Field Values
Method Detail
dealPlayer
void dealPlayer(Player player,
int delay)
Deal cards to the player, increments of delay are in milliseconds (ms)
1. deal a card to the player
2. call GameEngineCallback.nextCard(...)
3. continue looping until the player busts
(default value of GameEngine.BUST_TOTAL=21)
4. GameEngineCallback.bustCard(...)
5. call GameEngineCallback.result(Player, int, GameEngine)
with final result for player (the pre bust total)
6. update the player with final result so it can be retrieved later
Parameters:
player - the current player who will have their result set at the end
of the hand
delay - the delay between cards being dealt
See Also:
GameEngineCallback
dealHouse
void dealHouse(int delay)
Same as dealPlayer() but deals for the house and calls the house versions
of the callback methods on GameEngineCallback, no player parameter is
required
After the house deal has finished but BEFORE calling houseResult() win/loss values
are applied to all players based on their bet
Parameters:
delay - the delay between cards being dealt
See Also:
GameEngineCallback,
dealPlayer(Player,...