public Dictionary <SpaceTimeType, int> GetStats() { var stats = new Dictionary <SpaceTimeType, int> { { SpaceTimeType.Tech, 0 }, { SpaceTimeType.Mystic, 0 }, { SpaceTimeType.Wisdom, 0 } }; Form.Bonuses.ForEach(b => { if (b is TypedBonus) { stats[((TypedBonus)b).Bonus.Item1] += ((TypedBonus)b).Bonus.Item2; } }); FaceUp.ForEach(fu => fu.Bonuses.ForEach(b => { if (b is TypedBonus) { stats[((TypedBonus)b).Bonus.Item1] += ((TypedBonus)b).Bonus.Item2; } })); if (CurrentPlanet.Type != SpaceTimeType.Barren) { stats[CurrentPlanet.Type] += CurrentPlanet.Development; } return(stats); }
/// <summary> /// Create a new player object. /// </summary> /// <param name="game">The game instance.</param> internal Player(GameInstance game) { Id = idNext++; GameInstance = game; Board = new Board(); Deck = new Deck(); DiscardPile = new DiscardPile(); Equipped = new Equipped(); FaceUp = new FaceUp(); Graveyard = new Graveyard(); Hand = new Hand(); }
/// <summary> /// The player draws a card. /// </summary> internal void Draw() { // attempt to get the top-most card from the deck Card draw = Deck.Pull(0); // card was found if (draw != null) { FaceUp.Force(draw); // if there is space in hand if (Hand.Count < Hand.Capacity) { // perform onDraw events // and add the card to the hand if it is still there Card faceUp = FaceUp.Pull(0); if (faceUp != null) { Deck.Append(draw); } } // overdraw, the card is thus forgotten else { // perform onMill events FaceUp.Pull(0); } } // no card in deck, fatigue else { Fatigue(); } }
// Start is called before the first frame update void Start() { faceup = GameObject.FindGameObjectWithTag("Cube").GetComponent <FaceUp>(); GetCorrectionEuler(); }
public bool Matches(Token other) { return(FaceUp.Matches(other.FaceUp) && FaceDown.Matches(other.FaceDown)); }