Adds function to king pieces when they reach the opposite end of the board