Package Description

Here comes a short description of the Packages in the JaGaFa. Consult the Source-Referenced Javadoc section for more information.

package jagafa

In this package there is the NewViewTest class for starting the testing-application. It hold the main() method.

JassRoundCore and JassRound together make up the main game engine for a single game round.

package jagafa.objcet

The basic game objects like a Card, Hand, Player and Board. Also includes the CardList class and the GoneCardHeap.

package jagafa.ai

The JassAI interface defines the function a AI has to provide to the client game.

Yet only two simple implementations exist. The ProbabilityAI and the SimpleAI.

The ProbabilityTable class is a utility for calculating the probabilities for ProbabilityAI. Only the color probability function is implemented yet.

The RuleSetChoiceAI class takes a list of RuleSets and returns the one which best fits the hand of the given player. A description of the RuleSet choice algorithm can be found Here

package jagafa.rule

First of all there is the RuleSet interface which defines the functions the game needs to handle rules.

package jagafa.scores

To design a cardgame there is a need to report the scores for each completed round. The interface ScoreTable and the abstract class AbstractScoreTable are needed to implement those features. Those classes control the top-level game flow.

package jagafa.view

The most important class in jagafa.view is the JassRoundPanel which displays the board and the hands of the players.

The BoardPanel represents the board and the HandPanel represents a players hand.

CardButton objects represent cards.

The sub-package jagafa.view.newui holds a new implementation of the RoundController2.

Everything comes together here! The RoundController2 receives events from the UI and sends it to the JassRound. Then the JassRound object calls back the RoundController2 to update the UI.

Yet the UI is mainly designed for testing reasons.

package jagafa.naming

The EValueNames and EColorNames Enumerations represent the names of the resource files and also as translator for user-friendly card recognition (instead of integer representation)

package jagafa.flags

In here is the TestingFlags class which holds some flags for the display, some important constants. These flags will be removed after the JaGaFa is completed. The AIFlags class has some constants needed for the AI.

package jagafa.stats

Three important classes: PlayerStats collects some data about a specific player. RoundStats collects data and statistics about a JassRound. CardTool has some utility functions for the AI and stats.