I’m new to coding, and I mostly only know variables and booleans in swift.
I’ve been trying to code a pokemon-esqe thing, and here’s what it looks like:
Var charmander = “fire”
Var squirtle = “water”
Var bulbasaur = “grass”
“Water” > “fire”
Var battle1 = squirtle > charmander (true)
(The thing is, when I try to code the grass part, it returns false. Look.)
“water” < “grass” (false)
“grass” > “water” (false)
“fire” > “grass” (false)
“grass” < “fire” (false)
I need to get grass to work for the code to work the way I want, and it’s not working like this.
What I have tried:
I’ve tried both combinations of code (E.G. fire > grass and grass < fire), and have tried retyping “grass” in the initial variable, but it still doesn’t work! I don’t know wat to do.