public MemoryGrid(int gridSize, int nImage){
		if (gridSize % 2 == 0) 
			size = gridSize;
		else{
			System.out.println("Grid Size Error: Grid size has to be even");
			System.exit(1);
		}
		numImage=nImage;
		currentFlipped=new ArrayList<Integer>();
		ArrayList<Integer> a = new ArrayList<Integer>();
		for(int i=1;i<=nImage;i++){
			a.add(i);
		}
		for(int i=0; i<size/2; i++){
			int r=(int)(Math.random()*a.size());
			MemoryCard temp  = new MemoryCard(a.get(r));
			MemoryCard temp2 = new MemoryCard(a.get(r));
			memGrid.add(temp);
			memGrid.add(temp2);
			a.remove(r);
		}   

	}