/// <summary>Gets the <see cref="IZone"/> matching the zone identifier.</summary> /// <value>The <see cref="IZone"/>.</value> /// <param name="zone">The zone identifier.</param> /// <returns></returns> /// <exception cref="ZoneException">There is no zone implemented for the provided identifier</exception> public IZone this[Zone zone] { get { IZone result = _zones[(int)zone]; if (result != null) { return(result); } switch (zone) { case Zone.INVALID: result = null; break; case Zone.GRAVEYARD: result = new GraveyardZone(Game, Controller, zone); break; case Zone.PLAY: result = new BoardZone(Game, Controller, zone); break; case Zone.DECK: result = new DeckZone(Game, Controller); break; case Zone.HAND: result = new HandZone(Game, Controller); break; case Zone.SETASIDE: result = new SetasideZone(Game, Controller, zone); break; case Zone.SECRET: result = new SecretZone(Game, Controller, zone); break; case Zone.REMOVEDFROMGAME: break; default: throw new ZoneException("No such zone type when creating zone: " + zone); } _zones[(int)zone] = result; return(result); } }
private GraveyardZone(Controller c, GraveyardZone zone) : base(c, zone) { Type = Zone.GRAVEYARD; }
private GraveyardZone(Controller c, GraveyardZone zone) : base(c, zone) { Type = Zone.GRAVEYARD; //Entities = new List<IPlayable>(zone.Entities); }
private GraveyardZone(Controller c, GraveyardZone zone) : base(c, zone) { }