if i write only :
enemyFleet.fire(this);
in the onTurn method, the penultimate task accept.
if i write :
if(enemyFleet.fire(this) != null) {
enemyBullets.add(enemyFleet.fire(this));
enemyFleet.fire(this);
}
the last task accept.
but when i write them together the penultimate task went wrong.package com.codegym.games.spaceinvaders;
public class ShapeMatrix {
public static final int[][] ENEMY = new int[][]{
{7, 0, 7},
{7, 7, 7},
{0, 7, 0}
};
public static final int[][] BULLET = new int[][]{
{2},
{2}
};
}