/******************************** FILE HEADER **********************************
Main Class File:	MiniatureGolf.java
File:				Course.java

Author:				Michael Schultz
CS Login:			mschultz
Collaborators:

Completion Date:	10/15/02

Course:				CS 302
TA:					Mr. Schultz

Compiler:			Code Warrior IDE 5.0
Platform:			Windows 2000
*******************************************************************************/

import java.util.Vector;

/**
 * Course is truly a misnomer here. However, it is instructional for showing how
 * Assignment 1 works. Course holds a collection (here, a Vector) of Player
 * objects. When calls to addPlayer are made, the Vector adds the incomming
 * Player object to itself. When getPlayers is called, a new Group object is
 * returned with the collection of Player objects as the constructor's argument,
 * so that the Group will be iterating over the right collection of Players. 
 *
Bugs: none known
 *
 * @author		Michael Schultz
 * @version		1.0
 * @see also
 */
public class Course {

	/** the collection of Player objects*/
	private Vector players;
	
	/**
	 * The constructor takes no parameters. It only initializes the collection
	 * of objects to a new collection, currently holding nothing.
	 */
	public Course() {
		players = new Vector();
	}
	
	/**
	 * Adds a player to the course
	 *
	 * @param newPlayer the new Player object reference to be added
	 */
	public void addPlayer(Player newPlayer) {
		players.addElement(newPlayer);
	}
	
	/**
	 * returns an (ennumeration) (dictionary) ordered collection of the Player
	 * objects that are on the Course.
	 *
	 * @return an ordered collection of the Player objects
	 */
	public Group getPlayers() {
		return new Group(players);
	}
	
}