Capture Enclosed Territory - Coding problem | OneNoughtOne