implemented calculation of intersection coordinates, so that they can be rendered on top of the board