Click here to Skip to main content
15,795,581 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello
this function is for change the color the Circle c
but condition if(tc[i].equals(Clr)) is false

tc[] is table the colors

same one can help me :)


C#
public void changeColor(Circle c)
     {   int i;
         Color Clr=c.getC()
         for( i=0;i<8;i++)
         {
             if(tc[i].equals(Clr)){

                 c.setC(tc[i+1]);
                 break;
             }
         }


     }

;
Posted
Comments
Sandeep Mewara 27-Oct-12 11:36am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

Java
public void changeColor(Circle c)
     {   int i;
         Color Clr=c.getC()
         for( i=0;i<8;i++)
         {
             if(false == tc[i].equals(Clr)){
 
                 c.setC(tc[i+1]);
                 break;
             }
         }
 

     }


try this ;)
Where is the snippet coming from?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900