The loop does not come out : <p>I want to get a result that if i use a for loop then 'Monster' comes out 10 times.But 'Monster' came out continually. Could you tell me What the problem is?
Thank you for reading to the end:)</p>

<pre><code>private static void fight() {

    for(int i=0; i&lt;10; i++) {
    while (user.isalive() &amp;&amp; enemy.isalive()) {
        user.attack(enemy);
        if ( !enemy.isalive() ) break; 
        enemy.attack(user);
        System.out.println("------------------------------");
    }

    if (user.isalive()) {
        System.out.println("The monster is dead.");
        System.out.println("------------------------------");
        user.money+=enemy.money;

//            System.out.println(player.money);
            System.out.println("I got 100 won");
            System.out.println("total won : "+user.money+"won");
                     enemy.hp=50;

    }
    else {
        System.out.println("I'm dead and the game is over.");
        break;
    }return;
    }

}
</code></pre>
