Update roles.
Complete judge function.