private void attackCalculation(Player attacker, Player defender)
    {
        if (attacker.checkIfAlive() && defender.checkIfAlive())
        {
            // Defender HP lost = difference between attacker's strength and defender's constitution.
            int attackCalc = attacker.getStrValue() - defender.getConValue();
            
            // Defender takes 1 damage if constitution is higher than attacker's strength.
            if (attackCalc <= 0)
            {
                attackCalc = 1;
            }
            
            // Attacker cannot miss if hit is greater than or equal to the defender's evasion.
            if (attacker.getHitValue() >= defender.getEvdValue())
            {
                // Attacker cannot crit if luck is less than or equal to the defender's luck.
                if (attacker.getLukValue() <= defender.getLukValue())
                {
                    attackSuccessful(attacker, defender, attackCalc);
                }
                // Attacker can crit if luck is greater than defender's luck.
                else
                {
                    int randomNumber = random.nextInt(100);
                    // Attacker has a (x * 2)% crit chance depending on difference of luck.
                    int critChance = ((attacker.getLukValue() - defender.getLukValue()) * 2);
                    
                    // Ex: critChance = ((70-50) * 2) = 40% chance to crit.
                    // So if randomNumber generates any number between 0-39 then the attack is a crit.
                    if (randomNumber <= critChance)
                    {
                        critSuccessful(attacker, defender, attackCalc);
                    }
                    // Enters statement if attacker did not crit.
                    else
                    {
                        attackSuccessful(attacker, defender, attackCalc);
                    }
                }
            }
            
            // Attacker can miss if hit is less than defender's evasion.
            else
            {
                int randomNumber = random.nextInt(100);
                // Defender has a (x * 2)% dodge chance depending on difference.
                int dodgeChance = ((defender.getEvdValue() - attacker.getHitValue()) * 2);
                
                // Ex: dodgeChance = ((70-50) * 2) = 40% chance to dodge attack.
                // So if randomNumber generates any number between 0-39 then the attack is evaded.
                if (randomNumber <= dodgeChance)
                {
                    String result = attacker.getName() + "'s attack has been evaded by " + defender.getName() + ".\n";
                    results.append(result);
                }
                // Enters statement if attack was not dodged by the defender.
                else
                {
                    // Attacker cannot crit if luck is less than or equal to the defender's luck.
                    if (attacker.getLukValue() <= defender.getLukValue())
                    {
                        attackSuccessful(attacker, defender, attackCalc);
                    }
                    // Attacker can crit if luck is greater than defender's luck.
                    else
                    {
                        int randomNumber2 = random.nextInt(100);
                        // Attacker has a (x * 2)% crit chance depending on difference of luck.
                        int critChance = ((attacker.getLukValue() - defender.getLukValue()) * 2);

                        // Ex: critChance = ((70-50) * 2) = 40% chance to crit.
                        // So if randomNumber generates any number between 0-39 then the attack is a crit.
                        if (randomNumber2 <= critChance)
                        {
                            critSuccessful(attacker, defender, attackCalc);
                        }
                        // Enters statement if attacker did not crit.
                        else
                        {
                            attackSuccessful(attacker, defender, attackCalc);
                        }
                    }
                }
            }
        }
    }