about summary refs log tree commit diff stats
path: root/Source/Randomizer.h
blob: 87f1f599f34cd7c9c8c4cb9e420880af20e8501b (plain) (blame)
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
#pragma once
#include "Memory.h"
#include <memory>

class Randomizer {
public:
    Randomizer(const std::shared_ptr<Memory>& memory);
	void Randomize();
	void RandomizeChallenge();

	void AdjustSpeed();
	void RandomizeLasers();
	void PreventSnipes();

	enum SWAP {
		NONE = 0,
		TARGETS = 1,
		LINES = 2,
		AUDIO_NAMES = 4,
		COLORS = 8,
	};

private:
	int _lastRandomizedFrame = 1 << 30;
	void RandomizeTutorial();
	void RandomizeSymmetry();
	void RandomizeDesert();
	void RandomizeQuarry();
	void RandomizeTreehouse();
	void RandomizeKeep();
	void RandomizeShadows();
	void RandomizeTown();
	void RandomizeMonastery();
	void RandomizeBunker();
	void RandomizeJungle();
	void RandomizeSwamp();
	void RandomizeMountain();
	void RandomizeAudioLogs();

	void Randomize(std::vector<int>& panels, int flags);
	void RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex);
	void SwapPanels(int panel1, int panel2, int flags);
	void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order, std::vector<int> targets = {});
	void ReassignNames(const std::vector<int>& panels, const std::vector<int>& order);

	std::shared_ptr<Memory> _memory;

	friend class SwapTests_Shipwreck_Test;
};