I think i fixed the random error also I have moves/health updating real time and added end game logic