Why the 2nd task don't accept this part of code? :
if(bullets.isEmpty()) {
return;
}
What's wrong in this part of code ? :
else if(isAlive == true) {
// for(Bullet a : bullets) {
// a.isCollision(ship);
// }
}
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}
};
public static final int[][] PLAYER = new int[][]{
{7, 0, 7},
{7, 7, 7},
{0, 7, 0}
};
}