Class Driver
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
Driver
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class Driver
- extends java.awt.Frame
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary |
boolean |
acceptOffer(Property prop,
Player me,
TradeOffer mine,
TradeOffer other)
|
void |
addMessage(java.lang.String s,
java.awt.Color c)
|
void |
addPlayerTurn()
|
int |
addUp(int[] totalWon)
|
void |
buyAuctionProperty(Property p,
Player me,
int bid)
|
void |
changeGameStats()
|
int |
checkOwnMonopoly(Player me)
|
boolean |
checkOwnMonopoly(Player me,
int group)
|
static void |
destroyBuffer()
|
void |
drawBoard()
|
void |
drawChart()
|
void |
drawMessages()
|
void |
drawPlayers()
|
void |
drawPlayerStats()
|
void |
drawStuff()
|
int |
getDifferentOwners(Property[] group)
|
double |
getModifier(int value,
boolean offerGiver)
|
int |
getRandom(int a,
int b)
|
int |
getRelevance(Property prop,
Player me)
|
double |
getTotalGames()
|
double |
getWinRatio(int x)
|
double |
getWinRatio(Player me)
|
boolean |
isFocusTraversable()
|
static void |
main(java.lang.String[] args)
|
static void |
makeBuffer()
|
int |
numLiving()
|
int |
numOwned(Property[] group,
int own)
|
int |
oldAcceptOffer(int lastOffer,
Player other,
Property prop,
int lastMin)
|
void |
oldRunPlayer(int x)
|
void |
oldStartTrading(Player me,
Player other,
Property prop)
|
int |
oldTradeOffer(Property prop,
Player me,
int lastOffer,
boolean accept,
boolean lastAccept,
int times)
|
void |
paintComponent(java.awt.Graphics g)
|
boolean |
randomLess(Player me,
int a,
int b)
|
int |
randomValue(Player me,
int a,
int b)
|
int[][][][] |
readInValues()
|
java.lang.Object[] |
rollDice()
|
int |
rollDie()
|
int |
round(double d)
|
void |
runAuction(Property p,
int starter)
|
void |
runBroke(Player me)
|
void |
runBuyHouses(int x)
|
void |
runChangeSpaces(Player me,
int roll)
|
void |
runInJail(Player me,
boolean doubles,
int numDoubles)
|
void |
runLandOnBadSpace(Player me,
BadSpace bSpace,
int money)
|
void |
runLandOnCornerSpace(Player me,
Space space)
|
void |
runLandOnLuckSpace(Player me,
Space space,
int money,
int roll)
|
void |
runLandOnProperty(Player me,
Property p)
|
void |
runLandOnRailroad(Player me,
Railroad r)
|
void |
runLandOnSpace(Player me,
int mult,
int roll)
|
void |
runLandOnUtility(Player me,
Utility u,
int roll)
|
boolean |
runMortgageProperties(Player me)
|
int |
runPlayer(int x,
int numDoubles)
|
boolean |
runUnMortgageProperties(Player me)
|
void |
setUp(boolean start)
|
void |
setUpCards()
|
static void |
setUpFrame(Driver d)
|
void |
setUpGroups()
|
void |
setUpPlayers()
|
void |
setUpSpaces()
|
void |
startTrading(Player me,
Player other,
Property prop)
|
int |
totalGoodMonopolies()
|
int |
totalValue(Player me)
|
void |
trade(Player me,
Player other)
|
void |
tradeGroup(Player me,
Player other,
Property[] groupProps)
|
void |
tradeOffer(Property prop,
Player me,
TradeOffer mine,
TradeOffer other)
|
void |
tradeProperty(Player me,
Player other,
Property prop,
int agreedPrice)
|
void |
writeln(java.io.BufferedWriter out,
java.lang.String x)
|
Methods inherited from class java.awt.Frame |
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
frame2
public static Driver frame2
buffer
public static java.awt.Graphics2D buffer
bs
public static java.awt.image.BufferStrategy bs
img
public static java.awt.image.BufferedImage img
screenX
public static int screenX
screenY
public static int screenY
numPlayers
public static int numPlayers
timesWon
public static int[] timesWon
timesLanded
public static int[] timesLanded
totalTimesLanded
public static int totalTimesLanded
realStart
public static javax.swing.Timer realStart
spaces
public Space[] spaces
players
public Player[] players
groups
public Property[][] groups
chanceCards
public Card[] chanceCards
communityCards
public Card[] communityCards
chanceCardStack
public CardStack chanceCardStack
communityChestStack
public CardStack communityChestStack
timesGoneAround
public int timesGoneAround
numRolls
public int numRolls
wins
public int[] wins
playerCheck
public int playerCheck
turnCheckTime
public int turnCheckTime
playerTurn
public int playerTurn
numPDoubles
public int numPDoubles
lastTurn
public int lastTurn
aggressiveSets
public int[][][][] aggressiveSets
goAgain
public boolean goAgain
chainGo
public boolean chainGo
chart
public boolean chart
wrote
public boolean wrote
seeStats
public boolean seeStats
resetStats
public boolean resetStats
singleEvolution
public boolean singleEvolution
defFont
public static java.awt.Font defFont
messages
public java.util.ArrayList<Message> messages
colorGroups
public java.awt.Color[] colorGroups
Driver
public Driver()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
setUpFrame
public static void setUpFrame(Driver d)
makeBuffer
public static void makeBuffer()
destroyBuffer
public static void destroyBuffer()
isFocusTraversable
public boolean isFocusTraversable()
- Overrides:
isFocusTraversable
in class java.awt.Component
paintComponent
public void paintComponent(java.awt.Graphics g)
readInValues
public int[][][][] readInValues()
setUpPlayers
public void setUpPlayers()
setUpSpaces
public void setUpSpaces()
setUpGroups
public void setUpGroups()
setUpCards
public void setUpCards()
setUp
public void setUp(boolean start)
addPlayerTurn
public void addPlayerTurn()
drawChart
public void drawChart()
drawBoard
public void drawBoard()
totalGoodMonopolies
public int totalGoodMonopolies()
drawPlayers
public void drawPlayers()
round
public int round(double d)
getTotalGames
public double getTotalGames()
getWinRatio
public double getWinRatio(int x)
getWinRatio
public double getWinRatio(Player me)
drawPlayerStats
public void drawPlayerStats()
addUp
public int addUp(int[] totalWon)
numLiving
public int numLiving()
drawMessages
public void drawMessages()
drawStuff
public void drawStuff()
writeln
public void writeln(java.io.BufferedWriter out,
java.lang.String x)
changeGameStats
public void changeGameStats()
rollDice
public java.lang.Object[] rollDice()
rollDie
public int rollDie()
addMessage
public void addMessage(java.lang.String s,
java.awt.Color c)
runInJail
public void runInJail(Player me,
boolean doubles,
int numDoubles)
runChangeSpaces
public void runChangeSpaces(Player me,
int roll)
runLandOnBadSpace
public void runLandOnBadSpace(Player me,
BadSpace bSpace,
int money)
runLandOnCornerSpace
public void runLandOnCornerSpace(Player me,
Space space)
runLandOnLuckSpace
public void runLandOnLuckSpace(Player me,
Space space,
int money,
int roll)
getRandom
public int getRandom(int a,
int b)
randomValue
public int randomValue(Player me,
int a,
int b)
randomLess
public boolean randomLess(Player me,
int a,
int b)
runMortgageProperties
public boolean runMortgageProperties(Player me)
runUnMortgageProperties
public boolean runUnMortgageProperties(Player me)
runAuction
public void runAuction(Property p,
int starter)
buyAuctionProperty
public void buyAuctionProperty(Property p,
Player me,
int bid)
runLandOnProperty
public void runLandOnProperty(Player me,
Property p)
runLandOnUtility
public void runLandOnUtility(Player me,
Utility u,
int roll)
runLandOnRailroad
public void runLandOnRailroad(Player me,
Railroad r)
checkOwnMonopoly
public int checkOwnMonopoly(Player me)
checkOwnMonopoly
public boolean checkOwnMonopoly(Player me,
int group)
runBuyHouses
public void runBuyHouses(int x)
trade
public void trade(Player me,
Player other)
tradeGroup
public void tradeGroup(Player me,
Player other,
Property[] groupProps)
tradeProperty
public void tradeProperty(Player me,
Player other,
Property prop,
int agreedPrice)
getRelevance
public int getRelevance(Property prop,
Player me)
getDifferentOwners
public int getDifferentOwners(Property[] group)
numOwned
public int numOwned(Property[] group,
int own)
startTrading
public void startTrading(Player me,
Player other,
Property prop)
acceptOffer
public boolean acceptOffer(Property prop,
Player me,
TradeOffer mine,
TradeOffer other)
tradeOffer
public void tradeOffer(Property prop,
Player me,
TradeOffer mine,
TradeOffer other)
getModifier
public double getModifier(int value,
boolean offerGiver)
oldStartTrading
public void oldStartTrading(Player me,
Player other,
Property prop)
oldAcceptOffer
public int oldAcceptOffer(int lastOffer,
Player other,
Property prop,
int lastMin)
oldTradeOffer
public int oldTradeOffer(Property prop,
Player me,
int lastOffer,
boolean accept,
boolean lastAccept,
int times)
runLandOnSpace
public void runLandOnSpace(Player me,
int mult,
int roll)
runBroke
public void runBroke(Player me)
totalValue
public int totalValue(Player me)
runPlayer
public int runPlayer(int x,
int numDoubles)
oldRunPlayer
public void oldRunPlayer(int x)