This leads us to another problem: find an optimal solution - a set of lines with maximum number of points on a rectangular grid such that the difference between the number of grid points belonging to these lines and the number of lines is 36 (or less as we do not have to use some of the initial points). Obviously the maximum number of moves in the hatch game is not greater that the number of lines in the optimal solution. One can show that the number of lines in this second problem is bounded. Each point can be used to draw lines in 8 directions. At each move we use 6 or 7 directions from existing points and create a new point with 6 or 7 unused directions (depending on whether the new point is the end of the added line or not). The game could countinue to infinity but there are border points at which some of the directions are lost. As we play the game on a plane the area of lines must have a border. At a border point some of the directions are not used (the definition of a border point is not so obvious, it could be defined in such a way that at a border point at least 3 directions are not used). Because the number of inital points is 36 it can be easily concluded that there may be not more than 96 border points (there are 36*8=288 available directions which can be used by 288/3 border points at most). The area with border composed of 96 points can contain up to 300 vertical and horizontal lines and up to 330 diagonal lines. Hence the maximum number of lines is 630. Clearly this number is overestimated as many other directions are lost not directly at the border and we have considered diagonal and other lines independently.