A java implementation of the practice in http://cxsjsxmooc.openjudge.cn/warcraft1/A/