Skip to content

Latest commit

 

History

History

graph

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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.+"