/*
* Tier.cs
* Authors: Bradley R. Blankenship
* Copyright (c) 2007-2008 Cornell University
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System.Collections.Generic;
using ColonySim.Structures;
namespace ColonySim
{
///
/// Represents the current Tier of resources and buildings that the player
/// has access to.
///
internal class Tier
{
#region Fields
// The list of structures that the player has access to
private List mStructures = new List();
// The list of resources that the player has access to
private List mResources = new List();
// The next Tier
private Tier mNextTier;
// Requirement for this Tier
private int mRequiredPlays;
// The name of the Tier
private string mName = "DefaultName";
#endregion
#region Properties
///
/// Gets the list of available structures for the Tier.
///
public Structure[] Structures
{
get { return mStructures.ToArray(); }
}
///
/// Gets the list of available resources for the Tier.
///
public ResourceCode[] Resources
{
get { return mResources.ToArray(); }
}
///
/// Allows the getting of the Next Tier for the game.
///
public Tier NextTier
{
get { return mNextTier; }
}
///
/// Allows access to the number of required plays for the tier to
/// be accessible.
///
public int RequiredPlays
{
get { return mRequiredPlays; }
set { mRequiredPlays = value; }
}
///
/// Allows access to the name of the given tier.
///
public string Name
{
get { return mName; }
set { mName = value; }
}
#endregion
#region Constructs
///
/// Creates the Tier.
///
/// The list of structures
/// The list of resources
/// The next Tier, if there is one.
public Tier(IEnumerable pStructures, IEnumerable pResources, Tier pNext)
{
// Add all of the values
mStructures.AddRange(pStructures);
mResources.AddRange(pResources);
mNextTier = pNext;
}
#endregion
}
}