Move moveMonster function in the section it belongs to