forked from Jarno458/TsRandomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForwardFillingRandomizerFixture.cs
49 lines (40 loc) · 1.71 KB
/
ForwardFillingRandomizerFixture.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using NUnit.Framework;
using Timespinner.GameAbstractions.Inventory;
using TsRandomizer.IntermediateObjects;
using TsRandomizer.Randomisation;
using TsRandomizer.Randomisation.ItemPlacers;
namespace TsRandomizer.Tests
{
[TestFixture]
[Ignore("Its broken AF and lost its value")]
class ForwardFillingRandomizerFixture
{
[Test]
public void Should_generate_beatable_seed_in_1_pass()
{
var seed = new Seed(1U, SeedOptions.None);
var unlockingMap = new ItemUnlockingMap(seed);
var itemProvder = new ItemInfoProvider(SeedOptions.None, unlockingMap);
var randimizer = new ForwardFillingItemLocationRandomizer(seed, itemProvder, unlockingMap);
var itemLocations = randimizer.GenerateItemLocationMap(true);
Assert.That(itemLocations.IsBeatable(), Is.True);
}
[TestCase(1U)]
[TestCase(2U)]
[TestCase(3U)]
[TestCase(4U)]
[TestCase(5U)]
public void Should_fill_tuturial_with_melee_and_spellorb(uint seedIndex)
{
var seed = new Seed(seedIndex, SeedOptions.None);
var unlockingMap = new ItemUnlockingMap(seed);
var itemProvder = new ItemInfoProvider(SeedOptions.None, unlockingMap);
var randimizer = new ForwardFillingItemLocationRandomizer(seed, itemProvder, unlockingMap);
var itemLocations = randimizer.GenerateItemLocationMap(true);
Assert.That(itemLocations[ItemKey.TutorialMeleeOrb].ItemInfo.Identifier.LootType, Is.EqualTo(LootType.Orb));
Assert.That(itemLocations[ItemKey.TutorialMeleeOrb].ItemInfo.Identifier.OrbSlot, Is.EqualTo(EOrbSlot.Melee));
Assert.That(itemLocations[ItemKey.TutorialSpellOrb].ItemInfo.Identifier.LootType, Is.EqualTo(LootType.Orb));
Assert.That(itemLocations[ItemKey.TutorialSpellOrb].ItemInfo.Identifier.OrbSlot, Is.EqualTo(EOrbSlot.Spell));
}
}
}