2- For now your code is simple: you have one player and one enemy. But if you start to add more enemies, then you'll have problems to do the AI if you handle them without variables. You can use arrays to store all the enemies and iterate the values of it to do things, for example validations to know where is the player and then move all the enemies.