dataStructures
Class CompleteWinnerTree

java.lang.Object
  |
  +--dataStructures.CompleteWinnerTree
Direct Known Subclasses:
ExtendedCWTree

public class CompleteWinnerTree
extends java.lang.Object
implements WinnerTree


Constructor Summary
CompleteWinnerTree()
           
 
Method Summary
 int getWinner()
           
 void initialize(Playable[] thePlayer)
          initialize winner tree for thePlayer[1:thePlayer.length-1]
static void main(java.lang.String[] args)
          test program
 void output()
           
 void rePlay(int thePlayer)
          replay matches for player thePlayer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompleteWinnerTree

public CompleteWinnerTree()
Method Detail

getWinner

public int getWinner()
Specified by:
getWinner in interface WinnerTree
Returns:
the winner of the tournament

initialize

public void initialize(Playable[] thePlayer)
initialize winner tree for thePlayer[1:thePlayer.length-1]
Specified by:
initialize in interface WinnerTree
Throws:
java.lang.IllegalArgumentException - when the number of players is less than 2

rePlay

public void rePlay(int thePlayer)
replay matches for player thePlayer
Specified by:
rePlay in interface WinnerTree
Throws:
IndexOutOfBoundsException - when there is no player with index thePlayer

output

public void output()

main

public static void main(java.lang.String[] args)
test program