change boolean to int constants

For setUnit and setColor methods