Updated 'PlayerData' class.
Updated the 'PlayerData' class by adding the 'isFinished' method to it. In Addition, the empty constructor was optimized to initalize all class attributes for serializable cases.
This commit is contained in:
		@@ -43,10 +43,23 @@ public PlayerData(Color color) {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Constructor.
 | 
			
		||||
     */
 | 
			
		||||
    private PlayerData() {
 | 
			
		||||
        homeNodes = null;
 | 
			
		||||
        waitingArea = null;
 | 
			
		||||
        pieces = null;
 | 
			
		||||
        homeNodes = new HomeNode[4];
 | 
			
		||||
        waitingArea = new Piece[4];
 | 
			
		||||
        pieces = new Piece[4];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method will be used to check if the player is finished.
 | 
			
		||||
     * ToDo: Currently return always false. Implement logic!
 | 
			
		||||
     *
 | 
			
		||||
     * @return true or false.
 | 
			
		||||
     */
 | 
			
		||||
    public boolean isFinished() {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user