public bool TryPlayShipyard(Shipyard shipyard) { // card must be in the players hand if (!_game.Player.Hand.Contains(shipyard)) { return(false); } // need enough money if (shipyard.BaseCost > _game.Player.Credits) { return(false); } // playing costs a click if (_game.Player.Clicks < 1) { return(false); } // if we get here, go ahead and play it _actions.Add(new ShipyardAction(shipyard)); _game.Player.Shipyards.Add(shipyard); _game.Player.ChangeCredits(-shipyard.BaseCost); ChangeClicks(-1); GameViewController.MoveToConstructionArea(shipyard, true); GameViewController.AddGameLogMessage(string.Format("<b>You</b> play {0}", shipyard.CardName)); return(true); }