mardi 15 juin 2021

Having to destinations to select for state design pattern

I am Implmentating state pattern, my cause when the pause state is reached, I have two states that the user can back tow, that depends on the button the user click if the user clicks on the Play button (start to selected), if the user clicks on the back button (died start selected) currently, I know there is something wrong

class PauseState : State{
       override fun handleClick(
            locationUIController: LocationUIController,
            deliveryType: DeliveryType
        ) {
            if(deliveryType == DeliveryType.PlayButton ){
         
            }
           if(deliveryType == DeliveryType.backButton ){
           
            }
}

states graph

Aucun commentaire:

Enregistrer un commentaire