Я пытаюсь создать программу, похожую на линкор в python (любитель). Я попробовал несколько вещей, и я не могу понять, почему эта программа возвращает промах, даже если условия совпадают.Что мне здесь не хватает?спасибо
import random
import os
import time
XAXIS = [1,2,3,4,5,6,7,8,9,10]
YAXIS = [1,2,3,4,5,6,7,8,9,10]
########Generate Test Enemy Position
enemyPosX = random.randrange(1,len(XAXIS))
enemyPosY = random.randrange(1,len(YAXIS))
print(enemyPosX)
print(enemyPosY)
looping = True
while looping:
xAim = input("set X gun position (1-10):: ")
yAim = input("set Y gun position (1-10):: ")
xAim = int(xAim) #thought maybe I was comparing string to int
yaim = int(yAim)
print("{} {} :: {} {} ".format(enemyPosX, xAim, enemyPosY, yAim)) # Check Values for problem
if (xAim == enemyPosX) and (yAim == enemyPosY): #<---- Should both return true but nope
print("HIT!!!")
time.sleep(3)
looping = False
else:
print("MISS!!") #<--Getttin Miss regardless of Input
```