edu.princeton.repeatedgames.rgsolve.utilities.gamecompiler
Class GameCodeData

java.lang.Object
  extended by edu.princeton.repeatedgames.rgsolve.utilities.gamecompiler.GameCodeData
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class GameCodeData
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A class that defines the bare-bones of a Game extension via the source code that it would involve. This class is used in the dynamic compilation and loading of games in rgsolve.

See Also:
Serialized Form

Field Summary
(package private)  java.lang.String constructor
          code block for the body of the constructor falling the call to super
(package private)  double delta
          discount factor
static java.lang.String extension
          the extension of this file type for serialization
(package private)  java.lang.String fields
          code block defining additional fields of this Game subclass
(package private)  java.lang.String gameNotes
          any description of or notes on this game
(package private)  int m1
          number of actions to player 2
(package private)  int m2
          number of actions to player 2
(package private)  java.lang.String name
          the name of this game
(package private)  java.lang.String payoff1
          code block defining the payoffs to player 1 in the method @Override payoff1(int,int)
(package private)  java.lang.String payoff2
          code block defining the payoffs to player 2 in the method @Override payoff2(int,int)
private static long serialVersionUID
          Serialization ID
 
Constructor Summary
GameCodeData(int m1, int m2, double delta, java.lang.String fields, java.lang.String constructor, java.lang.String payoff1, java.lang.String payoff2, java.lang.String gameNotes, java.lang.String name)
          Constructor that initializes fields
 
Method Summary
 GameCodeData clone()
          A deep copy
 java.lang.String getClassString()
          Returns the full source code of the game defined by this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values

extension

public static final java.lang.String extension
the extension of this file type for serialization

See Also:
Constant Field Values

m1

int m1
number of actions to player 2


m2

int m2
number of actions to player 2


delta

double delta
discount factor


constructor

java.lang.String constructor
code block for the body of the constructor falling the call to super


fields

java.lang.String fields
code block defining additional fields of this Game subclass


payoff1

java.lang.String payoff1
code block defining the payoffs to player 1 in the method @Override payoff1(int,int)


payoff2

java.lang.String payoff2
code block defining the payoffs to player 2 in the method @Override payoff2(int,int)


gameNotes

java.lang.String gameNotes
any description of or notes on this game


name

java.lang.String name
the name of this game

Constructor Detail

GameCodeData

public GameCodeData(int m1,
                    int m2,
                    double delta,
                    java.lang.String fields,
                    java.lang.String constructor,
                    java.lang.String payoff1,
                    java.lang.String payoff2,
                    java.lang.String gameNotes,
                    java.lang.String name)
Constructor that initializes fields

Parameters:
m1 -
m2 -
delta -
fields -
constructor -
payoff1 -
payoff2 -
gameNotes -
name -
Method Detail

getClassString

public java.lang.String getClassString()
Returns the full source code of the game defined by this object.

Returns:
the source code for the game defined here

clone

public GameCodeData clone()
A deep copy

Overrides:
clone in class java.lang.Object