We need to the whole source code to be sure what's wrong with your code.
In my program, there are units controlled by the player and controlled by the computer, too. The
unitowner field holds these two attributions in string format ('player' or 'enemy').
And I would like draw a blue rectangle on the radar in case of player's units, and yellow rectangles in case of enemy units.
But now the program draws blue rectangles in both cases. Only this piece of code handles this drawing. It seems good, but it is not...