Задача по игре "2048". Не проходит большинство пунктов, связанных с методом Automove() в классе Model, не могу понять почему. Код метода:
public void autoMove() {
PriorityQueue<MoveEfficiency> queue = new PriorityQueue<>(Collections.reverseOrder());
queue.offer(getMoveEfficiency(this::up));
queue.offer(getMoveEfficiency(this::down));
queue.offer(getMoveEfficiency(this::right));
queue.offer(getMoveEfficiency(this::left));
queue.peek().getMove().move();
}package com.javarush.task.task35.task3513;
import javax.swing.JFrame;
import javax.swing.*;
/**
* Created by Osn on 23.12.2017.
*/
public class Main {
public static void main(String[] args) {
Model model = new Model();
Controller controller = new Controller(model);
JFrame game = new JFrame();
game.setTitle("2048");
game.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
game.setSize(450, 500);
game.setResizable(false);
game.add(controller.getView());
game.setLocationRelativeTo(null);
game.setVisible(true);
}
}