public void movementListener(){
		display.syncExec(new Runnable() {	
			@Override
			public void run() {
				board.addMouseMoveListener(new MouseMoveListener() {
					
					@Override
					public void mouseMove(MouseEvent e) {
					}
				});
				
				board.addMouseListener(new MouseListener() {
					
					@Override
					public void mouseUp(MouseEvent e) {
						if(board.isMouseMoved()){
							int x_move = board.getxBm()-board.getX();
							int y_move = board.getyBm()-board.getY();
							int mvx = x_move;
							int mvy = y_move;
							boolean up = true;
							boolean right = false;
							
							if((x_move) < 0 ){
								right = true;
								mvx = x_move*-1;
							}
							if(y_move < 0){
								up = false;
								mvy = y_move*-1;
							}
							if(mvx>board.getMx() && mvy>board.getMy() ){
								if (up == true) {
									if(right == true){
										userCommand = 5;
										setChanged();
										notifyObservers();
									}else{
										userCommand = 6;
										setChanged();
										notifyObservers();
									}
								} else {
									if(right){
										userCommand = 7;
										setChanged();
										notifyObservers();
									}else{
										userCommand = 8;
										setChanged();
										notifyObservers();
									}
								}
							}else if(mvx>board.getMx()){
								if(right){
									userCommand = 3;
									setChanged();
									notifyObservers();
								}else{
									userCommand = 4;
									setChanged();
									notifyObservers();
								}
							}else{
								if(up == true){
									userCommand = 1;
									setChanged();
									notifyObservers();
								}else{
									userCommand = 2;
									setChanged();
									notifyObservers();
								}
							}
						}
					}
					
					@Override
					public void mouseDown(MouseEvent e) {
						
					}
					
					@Override
					public void mouseDoubleClick(MouseEvent e) {
						board.setFocus();
					}
				});
				
				board.addKeyListener(new KeyListener() {	
					@Override
					public void keyReleased(KeyEvent e) { 
						
					}
					
					@Override
					public void keyPressed(KeyEvent e) {
						@SuppressWarnings("unused")
						int pressed = 0;
						switch(e.keyCode){
						
						case SWT.ARROW_UP:
							pressed = SWT.ARROW_UP;		
						/*	if(pressed == SWT.ARROW_UP){
								userCommand = 1;
								setChanged();
								notifyObservers();
								break;
							}*/
							if(getTwoMoves()){
								twoMoves = false;
								if(right){
									userCommand = 5;
									setChanged();
									notifyObservers();
									right = false;
								}else if(left){
									userCommand = 6;
									setChanged();
									notifyObservers();
									left = false;
								}
								up = false;
							}else{								
								twoMoves = true;
								up = true;
								display.timerExec(120, new Runnable() {
									@Override
									public void run() {										
										if(getTwoMoves()){
											userCommand = 1;
											setChanged();
											notifyObservers();
											twoMoves = false;
										}
										up = false;	
									}
								});
							}							
							break;
							
						case SWT.ARROW_DOWN:
							pressed = SWT.ARROW_DOWN;							
							if(getTwoMoves()){
								twoMoves = false;
						/*		if(pressed == SWT.ARROW_DOWN){
									userCommand = 2;
									setChanged();
									notifyObservers();
									break;
								}*/
								if(right){
									userCommand = 7;
									setChanged();
									notifyObservers();
									right = false;
								}
								if(left){
									userCommand = 8;
									setChanged();
									notifyObservers();
									left = false;
								}
								down = false;
							}else{								
								twoMoves = true;
								down = true;								
								display.timerExec(120, new Runnable() {
									@Override
									public void run() {									
										if(getTwoMoves()){
											userCommand = 2;
											setChanged();
											notifyObservers();
											twoMoves = false;
										}
										down = false;
									}
								});
							}
							break;
							
						case SWT.ARROW_RIGHT:	
							pressed = SWT.ARROW_RIGHT;							
							if(getTwoMoves()){
								twoMoves = false;
							/*	if(pressed == SWT.ARROW_RIGHT){
									userCommand = 3;
									setChanged();
									notifyObservers();
									break;
								}*/
								if(up){
									userCommand = 5;
									setChanged();
									notifyObservers();
									up = false;
									break;
								}
								if(down){
									userCommand = 7;
									setChanged();
									notifyObservers();
									down = false;
									break;
								}		
								right = false;
							}else{
								twoMoves = true;
								right = true;
								display.timerExec(120, new Runnable() {
									@Override
									public void run() {										
										if(getTwoMoves()){
											userCommand = 3;
											setChanged();
											notifyObservers();
											twoMoves = false;											
										}					
										right = false;
									}
								});
							}
							break;
							
						case SWT.ARROW_LEFT:
							pressed = SWT.ARROW_LEFT;							
							if(getTwoMoves()){
								twoMoves = false;
							/*	if(pressed == SWT.ARROW_LEFT){
									userCommand = 4;
									setChanged();
									notifyObservers();
									break;
								}*/
								if(up){
									userCommand = 6;
									setChanged();
									notifyObservers();
									up = false;
								}
								if(down){
									userCommand = 8;
									setChanged();
									notifyObservers();
									down = false;
								}
								left = false;
							}else{								
								twoMoves = true;
								left = true;
								display.timerExec(120, new Runnable() {
									@Override
									public void run() {
										if(getTwoMoves()){
											userCommand = 4;
											setChanged();
											notifyObservers();
											twoMoves = false;											
										}					
										left = false;
									}
								});
							}
							break;	
							
						// play with the numbers on the right side of the keyboard --> num lk should be off	
						case SWT.PAGE_UP:
							userCommand = 5;
							setChanged();
							notifyObservers();
							break;
						case SWT.HOME:
							userCommand = 6;
							setChanged();
							notifyObservers();
							break;
						case SWT.PAGE_DOWN:
							userCommand = 7;
							setChanged();
							notifyObservers();
							break;
						case SWT.END:
							userCommand = 8;
							setChanged();
							notifyObservers();
							break;
						}						
					}
				});			
			}
		});
	}