public void chooseAction(){
		if(game.findRowNumOfBottomFence()>(game.getBoard().getLength()-1)/2 +1
				&& game.findRowNumOfTopFence()<(game.getBoard().getLength()-1)/2 -1){
			int topGap = game.findRowNumOfTopFence()-0;
			int bottomGap = game.getBoard().getLength() - game.findRowNumOfBottomFence();
			if(topGap > bottomGap){
				pressDownKey();
			}
			else{
				pressUpKey();
			}

		}
		else{
			int middle = (game.findRowNumOfBottomFence()+game.findRowNumOfTopFence())/2;
			if(middle == (game.getBoard().getLength()-1)/2
				|| middle == (game.getBoard().getLength()-1)/2 +1){
					return;
				}
			if(middle > (game.getBoard().getLength()-1)/2){
				pressUpKey();
			}
			else if(middle < (game.getBoard().getLength()-1)/2){
				pressDownKey();
			}
		}
	}