Beispiel #1
0
    private void LoadCard(string fileName)
    {
        var id   = Helpers.GetFileShortNameNoExt(fileName);
        var card = XmlSerializeHelper.LoadFromXml <CardDesc>(fileName);

        if (card != null)
        {
            card.Id = id;
            cards.Add(id, card);
        }
    }
Beispiel #2
0
    // -----

    private void LoadDecks()
    {
        // TODO - Check validity (card existence)

        gameState.DeckOverlord =
            XmlSerializeHelper.LoadFromXml <List <string> >(Path.Combine(Constants.DataFolder,
                                                                         "Decks\\DeckOverlord.xml"));

        gameState.DeckRunner =
            XmlSerializeHelper.LoadFromXml <List <string> >(Path.Combine(Constants.DataFolder,
                                                                         "Decks\\DeckRunner.xml"));

        gameState.DeckOverlord.Shuffle();
        gameState.DeckRunner.Shuffle();
    }