CodeWars Two Fighters One Winner

CodeWars Two Fighters One Winner
0.0 0

#1

Two Fighters One Winner

So I am working on my final projects for Front End. Currently on the calculator, but I try to code one other thing a day. Even if it is something small, just to get experience and for fun. I started doing CodeWars because it made sense to practice there. The above problem has me just blanked out. Nothing I have done even in the advanced algorithm section compares to this (supposedly easy problem). Or if I did, I didn’t retain it. I hit a period for a while where I was working tired and probably studying to much.

Could someone point me in the direction of something to read to get an idea of what I am doing here? I don’t want the answer, just to understand how to solve this better.


#2

It’s a boring game, you don’t really need to read anything advanced.

It’s a turn-based game, so just play it out turn by turn, each fighter taking a swing at the other until one is down.


#3

I had a typo that I continued to make. Which explains why I couldn’t figure anything out. My bad. But thanks for pointing out that this was a lot simpler than I made it out to be.