summaryrefslogtreecommitdiffstats
path: root/src/Generating/POCPieceGenerator.h
blob: de3114ce01e1731fb738191fbdda053a328cd806 (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
50
51
52
53
54

// POCPieceGenerator.h

// Declares the cPOCPieceGenerator class representing a Proof-Of_Concept structure generator using the cPieceGenerator technique
// The generator generates a maze of rooms at {0, 100, 0}





#pragma once

#include "PieceGenerator.h"
#include "ComposableGenerator.h"





class cPOCPieceGenerator :
	public cFinishGen,
	protected cPiecePool
{
public:
	cPOCPieceGenerator(int a_Seed);
	~cPOCPieceGenerator();
	
protected:
	int m_Seed;
	
	/** The pieces from which the generated structure is built. */
	cPieces m_AvailPieces;
	
	/** The placed pieces of the generated structure. */
	cPlacedPieces m_Pieces;
	
	/** Bounds of the complete structure, to save on processing outside chunks. */
	cCuboid m_Bounds;


	// cFinishGen overrides:
	virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
	
	// cPiecePool overrides:
	virtual cPieces GetPiecesWithConnector(int a_ConnectorType) override;
	virtual cPieces GetStartingPieces(void) override;
	virtual void PiecePlaced(const cPiece & a_Piece) override;
	virtual void Reset(void) override;
} ;