added a method to check if a player has pieces in his waiting area
This commit is contained in:
		@@ -136,4 +136,18 @@ public int getIndexInHome(Piece piece) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * This method returns the homeNodes
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the homeNodes
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public boolean hasPieceInWaitingArea() {
 | 
				
			||||||
 | 
					        for (Piece piece : waitingArea) {
 | 
				
			||||||
 | 
					            if (piece != null) {
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user