Fixed some repetive code in predator and prey