cell.health -= fighters[0].compDmg(fighters[0],cell)
TypeError: compDmg() takes exactly 2 arguments (3 given)

Both fighters[0] and cell are object instances. How on earth does it see 3 arguments in this? I don't think wider context is needed, but just ask if it is.

obj.compDmg(), being a method of fighters[0], will automatically be passed the instance object. In effect, the method receives three arguments in your case. Try this:

cell.health -= fighters[0].compDmg(cell)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.