Problem to generate a sudoku

Discussion and feedback on Construct 2

Post » Mon Dec 08, 2014 11:37 am

Hi,

I'm a little lost, and blocked with Construct2 problem.
I am developing a Sudoku, and generating a series of numbers the browser with 25% of CPU crashes.

Attached as genre at random series numbers. Also I begin to think that the event to check if a value is in an array, not very optimized.

What do think? Any help? Thanks.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
2
Posts: 15
Reputation: 2,879

Post » Mon Dec 08, 2014 11:52 pm

Since you're using a while loop I'd guess you have an infinite loop somehow.
One thing I notice is if 9 is ever needed it won't work since
floor(random(1,9)) will only give values from 1 to 8

Why?
random(n) will only give values from 0 up to but not including n.

Instead you should do floor(random(1,10)) if you want 9 included.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover and 9 guests