Refactored King Survival

A slightly better solution than the original. TODO: documentations &
unit testing