public int isWon() {
		if(flaggedLocs().size()==numMines)
			for(Location L:flaggedLocs())
				if(!L.isMined())
				{
					won=2;
					return won;
				}
				else
					won=1;
		if(won==1)
			return won;
		else
		for(Location L:minedLocs())
			if(L.isClicked())
				won=0;
		return won;
	}