Check if the baord is completed and return to main menu
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-11 12:24:56 +02:00
parent e424cdca4e
commit def25d9e38
4 changed files with 35 additions and 0 deletions

View File

@ -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]){