You are trying to call (use the ..(...)
syntax) on an integer here:
ship.location[size][1]((ship.location[0][0],
ship.location[0][1] - size))
ship.location[size][1]
is an integer, and you are trying to call it by passing in the tuple (ship.location[0][0], ship.location[0][1] - size)
as the arguments.
Your code makes this mistake in more than one place; other examples include
ship.location[size][1]((ship.location[0][0],
ship.location[0][1] + size))
and
ship.location[size][1]
((ship.location[0][0] - size,
ship.location[0][1]))
and
ship.location[size][1]
((ship.location[0][0] + size,
ship.location[0][1]))
The backslash there still joins the physical line into a logical line, so the (...)
calls still apply to the integers.
It is not clear to me what you wanted to do with that expression, however, so I can't offer any remedy here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…