Beispiel #1
0
 // Update is called once per frame
 void NewParticipantListener()
 {
     participantID.text = ps.GetParticipantAsString();
     ps.ConditionFromParticipant();
     ParticipantStatus.Condition cond = ps.GetCondition();
     cubeset.text     = cond.cubeset.ToString();
     arrangement.text = cond.catmap.ToString();
 }
Beispiel #2
0
 void PreviousParticipantListener()
 {
     if (ps.GetParticipant() > 0)
     {
         participantID.text = ps.GetParticipantAsString();
         ParticipantStatus.Condition cond = ps.GetCondition();
         cubeset.text     = cond.cubeset.ToString();
         arrangement.text = cond.catmap.ToString();
     }
 }
Beispiel #3
0
 public DataFarmerObject(string tag)
 {
     this.tag         = tag;
     this.timestamp   = Time.time;
     ps               = ParticipantStatus.GetInstance();
     this.participant = ps.GetParticipant();
     this.trial       = ps.GetTrial();
     this.condition   = ps.GetCondition();
     this.category    = ps.GetCategory();
     this.cube        = ps.GetCube();
 }
Beispiel #4
0
    public List <CubeTuple> Shuffle(ParticipantStatus.Condition condition)
    {
        List <List <ColorShapeRotation> > arr = Cubesets[condition.cubeset][condition.catmap];

        CubeTuple[] shuffled = new CubeTuple[arr.Count];
        int         i        = 0;

        foreach (var c in arr)
        {
            shuffled[i] = new CubeTuple(c);
            i++;
        }
        System.Random random = new System.Random();
        for (i = 0; i < arr.Count; i++)
        {
            var replace = random.Next(arr.Count);
            var temp    = shuffled[replace];
            shuffled[replace] = shuffled[i];
            shuffled[i]       = temp;
        }
        return(new List <CubeTuple>(shuffled));
    }