임보경/spring/homework/src/main/java/lbk/homework/day0903/makeGameAlone/controller/manager/MonsterManager.java
<filename>임보경/spring/homework/src/main/java/lbk/homework/day0903/makeGameAlone/controller/manager/MonsterManager.javapackage lbk.homework.day0903.makeGameAlone.controller.manager;

import lbk.homework.day0903.makeGameAlone.entity.monster.Monsters;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

import static lbk.homework.day0727.secondDiceGame.utility.CustomRandom.makeCustomRandom;

@Getter
public class MonsterManager {
    private List<Object> monsterList;
    private Monsters monsters;

    public MonsterManager() {
        monsterList = new ArrayList<>();
        monsters = new Monsters();
    }

    public List createNewMonster() {
        for (int i = 0; i < 5; i++) {
            monsterList.add(acquireRandomMonster());
        }
        return monsterList;
    }

    public Object acquireRandomMonster () {
        int size = monsters.getMonsterBook().size();
        return monsters.getMonsterBook().get(makeCustomRandom( size, 0));
    }
}
