When you create your attributes player X and ennemy X you set it and never modify it.
if at first the x of player is 5 , and you set you player X to x of player then player X=5.
Even if x of player changes .
You must put the set player and the set ennemy x in the always block too.
When you start programming, if you see there's a mistake, put some print blocks ( for example , here, print player X), it will you find where is your mistake.