Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 667 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 667 Bytes

Graph

Directed graph implementation which may be useful for creating large machines more quickly. The Dungeon sample demonstrates a use case of this module.

Sample Usage

sealed class Energy {
    object Kinetic : Energy()
    object Potential : Energy()
}

sealed class EnergyTransition {
    object Store : EnergyTransition()
    object Release : EnergyTransition()
}

DirectedGraph(
        mapOf(
                Potential to mapOf(Release to Kinetic),
                Kinetic to mapOf(Store to Potential)
        ))

Install

Includes directed graphs

compile "com.ToxicBakery.kfinstatemachine:graph:2.+"