@Override
    public boolean keyPressed(KeyEvent evt) {
        switch(evt.getKeyCode()) {
            case KeyEvent.VK_DOWN:
                if(canMove(getLocation().getNeighbourLocation(Location.SOUTH))) {
                    setDirection(Location.SOUTH);
                }
                break;
            case KeyEvent.VK_UP:
                if(canMove(getLocation().getNeighbourLocation(Location.NORTH))) {
                    setDirection(Location.NORTH);
                }
                break;
            case KeyEvent.VK_LEFT:
                if(canMove(getLocation().getNeighbourLocation(Location.WEST))) {
                    setDirection(Location.WEST);
                }
                break;
            case KeyEvent.VK_RIGHT:
                if(canMove(getLocation().getNeighbourLocation(Location.EAST))) {
                    setDirection(Location.EAST);
                }
                break;
        }
        return true;
    }