Update king.c

the program is still to slow. also the 'if' statements can still be replaced by functions to make it look cleaner.