Creating a soduko-game

Hi ! Im trying to create a Soduko-game.
The graphics aint the problem… :wink:

The problem is the code, the functionallity to set up a soduko board.

I’ve tried many things but i cant get a simple solution…

Soduko is a game with 9*9 squares. In each row the numbers 1-9 should be entered and may only appear once in each row. The same for the columns.

Also in 3*3 squares (9 of them…) the numbers 1-9 should appear once…

How can i do this programatically? Ive tried to randomize numbers in a matrix 99 and while the number is randomized, check if it i exists in the row, col or 33 square, if it does, it should be changed…But this wont work…

Any ideas?