Master thesis possibly does not work out as expected
First of all, you can relax about the fact that you won't solve everything. In research, it's the default case that you will solve some of the problems, and leave plenty of others as future work. (There's a great inspirational comic about this truth.)


As a criterion for selecting the remaining problems you want to work on, I recommend to select the ones that will help you to a tell good overall story in your thesis. For example, it's better to deliever a program that works in certain cases and under certain assumptions, rather than a program that never works, but could possibly work if certain remaining problems would be solved.
Make sure to have the facts on your side. For example, prepare a table with the specific tasks you solved/tried to solve, the time you spent trying to solve them, and the specific issues that made the tasks hard to solve.