battle game in java