// Example code for CS 361.  Copyright 2013 by Tom Hayes.
// Important note: This file contains working code for implementing
// retrograde analysis for general games.  It is provided for informational
// purposes only.  You may play around with it and study it to help 
// yourself learn what needs to be done.  However, you may not copy
// any part of the source code to turn in for assignment 5.

/** Utility enumerated type for keeping track of the possible players of a game.
 * Values "noone" and "unknown" are included for convenience in keeping
 * track of our tentative answers to questions like "who will win from
 * this position (with best play on both sides)?"
 */
public enum GamePlayer {

    FIRST_PLAYER, SECOND_PLAYER, NOONE, UNKNOWN;
    
    public GamePlayer negate( ) {
	switch (this) {
	case FIRST_PLAYER: return SECOND_PLAYER;
	case SECOND_PLAYER: return FIRST_PLAYER;
	case NOONE: return NOONE;
	case UNKNOWN: return UNKNOWN;
	default: return UNKNOWN;
	}
    }

    @Override
    public String toString( ) {
    	switch (this) {
	case FIRST_PLAYER: return "First Player";
	case SECOND_PLAYER: return "Second Player";
	case NOONE: return "Draw (no player)";
	case UNKNOWN: return "Unknown";
	default: return "Unknown";
	}
    }
	
}