# Make unique Array Pairs

**URL:** <https://forum.kirupa.com/t/make-unique-array-pairs/315162>\
**Category:** flash\
**Created:** [October 19, 2010, 9:48am UTC](https://forum.kirupa.com/t/make-unique-array-pairs/315162 "2010-10-19T09:48:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![interactivex](https://avatars.discourse-cdn.com/v4/letter/i/a9a28c/32.png) [@interactivex](https://forum.kirupa.com/u/interactivex)\
**Post date:** [October 19, 2010, 9:48am UTC](https://forum.kirupa.com/t/make-unique-array-pairs/315162/1 "2010-10-19T09:48:21Z")

</div>

I am making an user application where users can chat one on one for an x amount of time till they go to the next user (see it as speeddating). Only they are all women talking about women stuff like knitting or something. A friends chat.

I am stuck with making unique pairs. Someone helped me with the basic code, only the first round is going great (unique pairs), but then it gets mixed up:

Here is the code:

var peeps:Array = new Array(“Donna”, “Kelly”, “Brenda”, “Summer”, “Cindy”, “Lila”);

checkAllCombinations();

function checkAllCombinations():void {  
var roundNumber:int = 0;

```
for (var rotation = 0; rotation &lt; peeps.length; rotation++) {
	roundNumber++;
	for (var i = 0; i &lt; peeps.length; i++) {
		var a = peeps*;
		var b = peeps[((peeps.length/2)+i+rotation)%peeps.length];
		trace("Round "+roundNumber+": "+a + " - " + b);
	}
}

```

}

As you can see everyone in round 1 is paired good. But in round 2 you see (for example) Donna talking to Cindy, but Brenda is also talking to Donna. that’s not right. she can’t talk to 2 people at once. So what is going wrong? I just can’t figure it out.

Can someone help me please? Thanks in advance
