Code example for ArrayDeque

Methods: add

0
 
    @Override 
    public Deque<GameAction> execute(GameDataBean gameData) {
        String enemy = gameData.getEnemy();
        log.fine(enemy);
        Deque<GameAction> deque = new ArrayDeque<>();
        GameAction confuse = new GameAction("confuse " + enemy);
        GameAction backstab = new GameAction("backstab " + enemy);
        GameAction heartplunge = new GameAction("heartplunge " + enemy);
        GameAction enervate = new GameAction("enervate " + enemy);
        deque.add(confuse);
        deque.add(backstab);
        deque.add(confuse);
        deque.add(heartplunge);
        deque.add(enervate);
        return deque;
    } 
}