Check if the baord is completed and return to main menu
This commit is contained in:
@ -42,6 +42,8 @@ public class Piece extends Shape{
|
||||
|
||||
public ArrayList<Vec2> getOccupation(){
|
||||
ArrayList<Vec2> ret = new ArrayList<>();
|
||||
if(Position == null)
|
||||
return ret;
|
||||
for (int x = 0; x < height; x++) {
|
||||
for (int y = 0; y < width; y++) {
|
||||
if(getShape()[x][y]){
|
||||
|
Reference in New Issue
Block a user