Example #1
0
        public void PaintLocation(int x, int y, HullPaintingRobot.Color c)
        {
            HullLocations[x, y] = (int)c;

            minX = Math.Min(minX, x);
            minY = Math.Min(minY, y);
            maxX = Math.Max(maxX, x);
            maxY = Math.Max(maxY, y);
        }
Example #2
0
        public int GetLocationsWithColor(HullPaintingRobot.Color c)
        {
            int numLocations = 0;

            foreach (var hullLocation in HullLocations)
            {
                if (hullLocation == (int)c)
                {
                    numLocations++;
                }
            }

            return(numLocations);
        }