# ion

 Apr 11 awarded Student Apr 10 comment What algorithm can I use to detect simple shapes in a 4x4 matrix?well the thing is that i was planning to add multiple shapes in a single matrix and then run the algorithm for each color separately, and if i detect a valid shape i take it from there Apr 10 comment What algorithm can I use to detect simple shapes in a 4x4 matrix?wait a min ..i just realized...there are actually 5 values (counting the 0) Apr 10 comment What algorithm can I use to detect simple shapes in a 4x4 matrix?the matrix itself it's an array of integers but they range from 0 to 3 (4 values) your idea is great but an algorithm would be better for this situation because of all the permutations possible (there are literally thousandths of possibilities and if i decide to upgrade the game to a 5x5 or higher the nr will grow exponentially) Apr 10 comment simple detection algorithmthere's only one shape but as you see in the 2nd example there could be a stray "o" that can be considered a shape Apr 10 awarded Student Apr 10 comment simple detection algorithmthe way i generate the matrix on the server side...there can't be more than one shape of size 4+ Apr 10 comment simple detection algorithmyes the largest shape of a certain color Apr 10 asked simple detection algorithm Apr 10 asked What algorithm can I use to detect simple shapes in a 4x4 matrix?