so I should plan things out very carefully more, should I use pseudocode or flowcharts or uml
A combination of all 3, depending on how big your application is. It is best to visualise everything before you start coding. The amount of times I code something, have difficulty understanding it (drawing with your finger in the air only goes so far!) and then map out everything (coordinates, the next positions, grid squares, calculations) really helps me understand what is going on. Trust me, draw it out on a big sheet of A4!
Back to the original question, I really think you should have taken on repeated advice by now of eliminating magic numbers from you code. This:
if(x>=300 && x <=350 && y>=225 && y <=275)
if(x>=350 && x <=400 && y>=225 && y <=275)
I can only assume means that you are checking for a collision in a top-left quadrant, or top-right quadrant, and then setting font_rect at a new position. I also guess that board_x = true means that you are setting that grid box to no longer accept shapes. I can only assume because it is impossible to tell with properly named variables to represent these coordinates. I am unable to help to the fullest extent if you are unable to provide enough information.
On a side-note, a calculator application might not be as simple as you might think depending on what you want it to do. Alas, it won't work without proper variables..