ru.sstu.renju.core
Enum GameResult.Winner

java.lang.Object
  extended by java.lang.Enum<GameResult.Winner>
      extended by ru.sstu.renju.core.GameResult.Winner
All Implemented Interfaces:
Serializable, Comparable<GameResult.Winner>
Enclosing class:
GameResult

public static enum GameResult.Winner
extends Enum<GameResult.Winner>

Winner enumeration represents possible game winners.

Since:
Renju 1.0
Author:
denis_murashev

Enum Constant Summary
BLACK
          The winner is first (Black) player.
DRAW
          There is no winner.
WHITE
          The winner is second (White) player.
 
Method Summary
 String getText()
           
static GameResult.Winner valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GameResult.Winner[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BLACK

public static final GameResult.Winner BLACK
The winner is first (Black) player.


DRAW

public static final GameResult.Winner DRAW
There is no winner. Draw.


WHITE

public static final GameResult.Winner WHITE
The winner is second (White) player.

Method Detail

values

public static GameResult.Winner[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GameResult.Winner c : GameResult.Winner.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GameResult.Winner valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getText

public String getText()
Returns:
the text


Copyright © 2013 TFI branch of Engels Instutute of Technology. All Rights Reserved.