Exemplo n.º 1
0
        public void ApplyEndGame(int levelNumber, int points,
                                 EndTypes endType, IList <InventoryItem> items, Location location)
        {
            var gameEndRecord = new GameEndRecord
            {
                LevelNumber = levelNumber,
                Points      = points,
                EndType     = endType
            };

            GameEndRecords.Add(gameEndRecord);
            InventoryItems.Clear();
            if (endType != EndTypes.Died)
            {
                Location = location;
                if (items.Any())
                {
                    InventoryItems.AddRange(items);
                }
            }
        }