fourwin
Class FourGameManager

java.lang.Object
  extended by fourwin.FourGameManager

public class FourGameManager
extends Object

This class represents the main control of the action of the fourwin game. It checks the default values after clicking the start button and controls if the game is over. Also a new round of the game is possible. The class also gives important informations about the game to the class FourGUI.

Author:
Konstantin

Field Summary
private static int beginnerValue
           
(package private)  PlayingField board
           
(package private)  BrickConnection brickCon
           
(package private)  FourGUI gui
           
private static boolean isGameOver
           
(package private)  String playername
           
 
Constructor Summary
FourGameManager(FourGUI gui)
          Constructor to create a FourGameManager object.
 
Method Summary
static boolean isGameOver()
           
static void main(String[] args)
          main method that creates a GUI object and controls the whole game.
 void setBeginnerValue(int beginnerValue)
          This method sets the actual beginnerValue dependent on the radio button pressed at the GUI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gui

FourGUI gui

playername

String playername

board

PlayingField board

beginnerValue

private static int beginnerValue

brickCon

BrickConnection brickCon

isGameOver

private static boolean isGameOver
Constructor Detail

FourGameManager

public FourGameManager(FourGUI gui)
Constructor to create a FourGameManager object.

Parameters:
gui - object of the attached GUI.
Method Detail

main

public static void main(String[] args)
main method that creates a GUI object and controls the whole game.

Parameters:
args -

isGameOver

public static boolean isGameOver()
Returns:
True if the game is finished and currently not running.

setBeginnerValue

public void setBeginnerValue(int beginnerValue)
This method sets the actual beginnerValue dependent on the radio button pressed at the GUI. The possible values are: "0" - human or 4rowbot always begins "1" - the loser of the last round begins "2" - the beginner alternates

Parameters:
beginnerValue -