Skip to content

Instantly share code, notes, and snippets.

View harshmittal2810's full-sized avatar

Harsh Mittal harshmittal2810

  • Mumbai
View GitHub Profile
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="80dp"
android:paddingBottom="8dp">
<ImageView
android:id="@+id/ivotp"
android:layout_width="16dp"
android:layout_height="16dp"
@cjohnson318
cjohnson318 / FiniteStateMachine.kt
Last active June 27, 2022 17:47
Simple Finite State Machine in Kotlin
import kotlin.test.assertEquals
data class State(val state: String)
data class Event(val event: String)
data class CurrentStateEvent(val state: State, val event: Event)
class TransitionTable {
private var stateTable = mutableMapOf<CurrentStateEvent, State>()