mirror of
				https://github.com/lov3b/Schack.git
				synced 2025-11-04 07:00:21 +01:00 
			
		
		
		
	Added Exception check in try-catch
This commit is contained in:
		@@ -78,9 +78,12 @@ public abstract class Piece extends Component {
 | 
			
		||||
        } catch (NullPointerException npe) {
 | 
			
		||||
            // This is an empty spot
 | 
			
		||||
            movable.add(pos);
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
        } catch (IndexOutOfBoundsException e) {
 | 
			
		||||
            // This means that the player is at the edge
 | 
			
		||||
        }
 | 
			
		||||
        catch (Exception e){
 | 
			
		||||
            // For good meassure
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user