Package | Description |
---|---|
s3games.engine | |
s3games.engine.expr |
Modifier and Type | Field and Description |
---|---|
Expr |
GameRule.action
action expression to evaluate, after the rule was applied
|
Expr |
GameRule.condition
an expression that must evaluate to true in order for this rule to be applicable
|
Expr |
GameRule.currentPlayer
expression evaluating to a number of the player that can make this move
|
Expr |
GameRule.element
element to move - expression that evaluates to string or a string with variable reference
|
Expr |
GameRule.from
location from where the element can be moved - evaluates to string or a string with variable references
|
Expr |
GameScoring.situation
a situation that should evaluate to true if the score is to be updated
|
Expr |
GameRule.state
state of the element - or an expression returning a number
|
Expr |
GameRule.to
location to where the element can be moved - evaluates to string or a string with variable references
|
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Expr> |
GameScoring.amounts
the actual scores to be added to the players listed in players list at the same index
|
java.util.ArrayList<Expr> |
GameScoring.players
expressions telling the player numbers who should have the score updated
|
java.util.ArrayList<Expr> |
GameRule.scoreAmount
a list of score values to add to each player that is in scorePlayer list in the same index
|
java.util.ArrayList<Expr> |
GameRule.scorePlayer
a list of players for whom the score should be updated, if the rule was applied
|
java.util.Map<Expr,Expr> |
GameSpecification.terminationConditions
list of conditions expressions that determine the game is over, if
they evaluate to true.
|
java.util.Map<Expr,Expr> |
GameSpecification.terminationConditions
list of conditions expressions that determine the game is over, if
they evaluate to true.
|
Constructor and Description |
---|
GameScoring(Expr situation)
construct an empty game scoring set of rules
|
Modifier and Type | Field and Description |
---|---|
Expr |
Expression.expr
the list of expressions one for each line (or single expression for one-line expressions)
|
Modifier and Type | Method and Description |
---|---|
Expr |
Expr.append(Expr expr)
Allows appending a new expression to this expression,
thus getting a Expr_LIST if it was not already.
|
static Expr |
Expr.booleanExpr(boolean b)
constructor method - returns a boolean expression that holds the specified logical value
|
abstract Expr |
Expr.eval(Context context)
evaluates this expression and returns the resulting value
|
Expr |
Context.getVar(java.lang.String var)
the value to which the specified variable name is mapped, or null if variables do not contain var
|
static Expr |
Expr.numExpr(int num)
constructor method - returns a numerical expression that holds the specified number
|
static Expr |
Expr.parseExpr(java.lang.String ln)
Parse the expression from a string representation as appears in the
game specification file.
|
static Expr |
Expr.strExpr(java.lang.String str)
constructor method - returns a string expression that holds the specified string
|
Modifier and Type | Method and Description |
---|---|
Expr |
Expr.append(Expr expr)
Allows appending a new expression to this expression,
thus getting a Expr_LIST if it was not already.
|
boolean |
Expr.equals(Expr other,
Context context)
compares if the values of this expression and the other expression are the same
|
void |
Context.setVar(java.lang.String var,
Expr val) |