Skip to content

Create gender#1

Open
AlberTgarY wants to merge 1 commit intoYebulabula:masterfrom
AlberTgarY:patch-2
Open

Create gender#1
AlberTgarY wants to merge 1 commit intoYebulabula:masterfrom
AlberTgarY:patch-2

Conversation

@AlberTgarY
Copy link

dddddd

@AlberTgarY
Copy link
Author

public Object lowest_Foodlevel_Rabbit()
{
int min = 0;

    HashMap<Integer,Object> findLevel= new HashMap();
    for(Object Youngrabbit:get_children())
    {
        if(Youngrabbit instanceof Rabbit){
            Rabbit rabbit = (Rabbit) Youngrabbit;
            findLevel.put(rabbit.get_Foodlevel(),rabbit);
        }
    }
    for(Object Youngrabbit:get_children())
    {
        if(Youngrabbit instanceof Rabbit){
            Rabbit rabbit = (Rabbit) Youngrabbit;
            if(rabbit.get_Foodlevel()<min)
            {
                min = rabbit.get_Foodlevel();
            }
        }
    }
    return  findLevel.get(min);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant