Refactoring to no duplicate code
Merge branch 'master' of https://github.com/a12tdt4240/grotrisk.git