RuleGenerator

io.github.memo33.metarules.meta.RuleGeneratorSyntax.RuleGenerator

Needs to be implemented for generating RUL2 code for a specific project, along with an Syntax#IdResolver.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def start(): Unit

Generates the Rules. Needs to be implemented.

Generates the Rules. Needs to be implemented.

Attributes

Concrete methods

def %: CopyTile.type
protected def createRules(): Unit

When called, the Rules in the buffer will be flushed, but duplicate Rules in the buffer will be omitted.

When called, the Rules in the buffer will be flushed, but duplicate Rules in the buffer will be omitted.

Attributes

Abstract fields

The context provides the resolver (the function that maps Tiles (meta syntax) to IdTiles (IID, Rot, Flip).

The context provides the resolver (the function that maps Tiles (meta syntax) to IdTiles (IID, Rot, Flip).

It also provides the tileOrientationCache, which overwrites the possible absolute orientations of some IDs when the RuleTransducer determines that this is necessary. For correct functionality, it is important to overwrite this by a map that is common between all rule generators (globally).

It also implements handling of mirror variants.

Attributes

Concrete fields

protected val Rules: RulesBuilder

A buffer for Rules to collect Rules before flushing them via createRules.

A buffer for Rules to collect Rules before flushing them via createRules.

Attributes

val queue: Queue[Rule[IdTile]]

The implementation of this is likely to change. After start has been called, the generated Rules can be fetched from this queue.

The implementation of this is likely to change. After start has been called, the generated Rules can be fetched from this queue.

Attributes