I am trying to get this code to run in the output panel and nothing is showing up. I need help figuring out what is wrong with my code and why it will not run.
var firstName = "Bella" var lastName = "Achi"
let fullName = firstName + " " + lastName
print(fullName)
struct Player { var characterName: String var strength: Int var intelligence: Int var wisdom: Int var dexterity: Int var consitution: Int var charisma: Int var itemsCharacterHas: String var characterCatchPhrase: String var currentHP: Int var maximumHP: Int
var Player = (characterName: "Rumble McSkirmish",
strength: 18,
intelligence: 5,
wisdom: 3,
dexterity: 15,
constitution: 18,
charisma: 10,
itemsCharacterHas: "Red headband",
characterCatchPhrase: "Fireball! Upper cut! Downer cut! Bowl of punch!",
currentHP: 138,
maximumHP: 145)
func printCurrentHP() {
print(currentHP)
}
func printCharacterCatchPhrase() {
print(characterCatchPhrase)
}
mutating func majorDamage() {
currentHP = -25
}
mutating func healthPack() {
currentHP = +15
let currentHP = 138
if self.currentHP == maximumHP{
self.currentHP = 145
}
}
mutating func healthRestore() {
currentHP == maximumHP
let currentHP = currentHP
if currentHP < 0{
print("Player died")}
}
}