n-player chess code sketch