Hello
I am making a piece of software that reads a board of difference pieces and then puts them into an array for management. I am at the point where I have got a rectangle around the whole board and am researching what the quickest and most effective way to locate each piece and store it in an array would be. The way in which I find the pieces is through searching a region for a small BMP for each different piece. The whole board it 6x12 and it has 7 different types of pieces.
Method 1:
Make a small rectangle for each piece position and then scan then scan them one by one - it would only be scanning a very small area, but would be doing it (6x12) 72 times each time the board had to be refreshed.
Method 2:
Scan 6 or 12 times for each column or row picking each piece as it goes along and storing it in an array. This would scan a much bigger area but only have to do it either 6 or 12 times each time it had to be refreshed.
Does anyone have any insight on which was would be the best? or even better have another method that would be even more effective?
Thank you