Thats right. I have done a program that reads minesweeper out of its Hdc and decided to do a program that calculates the chances of hitting i mine on each square. But my calculating functions went really wrong. I can't post my huge project here, but if someone is interested, please help me with this. I need a correct function that calculates all probabilities of the mines.

Thanks!