Help with Methods

Hey guys!
I’m new in coding and I was working on Blackjack game and got stuck with the methods. Can someone explain me how can I use two IBAAction functions together?
For example, when you press shuffle (first button it will give a cards, but then I also want another button which will to determine whether hit another card or hold.

Thank you

Create your two buttons in interface builder (storyboard) and give each of them their own IBAction connection in your corresponding ViewController.swift file and then in each add the appropriate code so that when you tap on either button the code does what you expect.

Yeah I get that but what if I want to make a statement like:

If person pressed shuffle (actionOne) {

                 If person pressed hit (actionTwo) {

                     shuffle and get one card
                   else {
                    simply shuffle


So basically I need help to include one action inside of the other

Sorry if its confusing. It’s hard to explain

I feel like there’s some easy way and I’m just overthinking but I can’t find solution to that problem. I simply can’t put one method inside of another

Perhaps the solution is to set some Boolean values that you can interrogate. Try setting up one that stores hitTapped (or whatever you prefer to call it) and set that to true if the player has tapped the hit button otherwise set to false. When you define the Boolean at the top of your ViewController set it to false by default
var hitTapped = false

So in your shuffleTapped() button code (if that is what you called it)

@IBAction func shuffleTapped(_ sender: Any) {
    hitTapped = false

Your hitTapped button code

@IBAction func hitTappedButton(_ sender: Any ) {
    hitTapped = true

shuffleCards function

func shuffleCards() {
    if hitTapped == true {  //  alternatively this can be coded as  if hitTapped {
        // Deal one card
    } else {
        //  whatever code is required  

Is that of any help?

Thank you! It was really helpful