Question is kind of hard to ask. I'll try my best to explain it.
I have a 2D array that is a grid. This grid has its co开发者_高级运维ntents filled with 0 and 1.
I want to store in a list the coordinates of the array that only have 0. How would you do that?
For example: the coordinate location 2, 3 has the value of 0. How should one go about storing the 2, 3?
Create a Point
class that has coordinates (x,y) and the value 0 or 1. Store a List<Point>
and you're all set.
精彩评论