public int down(){
		int movedNr = 0;
		for(int i=0;i<getY();i++){
			ArrayList<Integer> merged = new ArrayList<Integer>(2); //list of all tiles which are already merged and are not allowed to be merged again
			for(int u=getX()-1;u>0;u--){//go from right to left
				int cv = u-1;
				if(cells[cv][i] != 0){
					Boolean moved = false;
					for(int t=u;t<getX();t++){ //go from left to right
						if(cells[t][i] == 0){
							cells[t][i] = cells[cv][i];
							cells[cv][i] = 0;							
							cv++;
							moved = true;
						}else{
							//check if it could be merged and if we are allowed to merge
							if(cells[cv][i] == cells[t][i] && !merged.contains(t)){ 
								cells[t][i] = cells[cv][i] * 2;
								cells[cv][i] = 0;
								merged.add(t); 
								moved = true;								
							}
							break;
						}
					}
					if(moved) movedNr++;
				}
			}
		}
		return movedNr;
	}