package com.github.mondei1.offpass

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import kotlinx.android.synthetic.main.activity_generator.*

class GeneratorActivity : AppCompatActivity() {
    var length: Int = 12

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_generator)

        length_label.setText(length.toString())
        Log.i("Generator", "Length: $length")
        add_button.setOnClickListener {
            Log.i("Generator", "Length: $length")
            length++
            length_label.setText(length.toString())
        }
        subtract_button.setOnClickListener {
            Log.i("Generator", "Length: $length")
            length--
            length_label.setText(length.toString())
        }
    }
}