Commit d9ec00c0 authored by Dasoo Milton Yoon's avatar Dasoo Milton Yoon

hello

parent 17203c5b
......@@ -129,7 +129,7 @@
<Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="End Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="&amp;#10;cur_items = [];&amp;#10;if (Prime == 1) {&amp;#10; cur_items = items_list_1;&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; cur_items = items_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; cur_items = items_list_3;&amp;#10;}&amp;#10;&amp;#10;&amp;#10;feedback_items = [];&amp;#10;if (Prime == 1) {&amp;#10; feedback_items = feedback_list_1;&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; feedback_items = feedback_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; feedback_items = feedback_list_3;&amp;#10;}" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="&amp;#10;cur_items = [];&amp;#10;feedback_items = [];&amp;#10;if (Prime == 1) {&amp;#10; cur_items = items_list_1;&amp;#10; feedback_items = feedback_list_1&amp;#10;}&amp;#10;if (Prime == 2) {&amp;#10; cur_items = items_list_2;&amp;#10; feedback_items = feedback_list_2;&amp;#10;}&amp;#10;if (Prime == 3) {&amp;#10; cur_items = items_list_3;&amp;#10; feedback_items = feedback_list_3;&amp;#10;}&amp;#10;" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code_2" valType="code"/>
......@@ -207,7 +207,7 @@
<CodeComponent name="code">
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="function getRandomIntInclusive(min, max) {&amp;#10; min = Math.ceil(min);&amp;#10; max = Math.floor(max);&amp;#10; return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive &amp;#10;}&amp;#10;&amp;#10;&amp;#10;&amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="used_items = []&amp;#10;available_items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];&amp;#10;&amp;#10;&amp;#10;&amp;#10;function shuffle(a) {&amp;#10; var j, x, i;&amp;#10; for (i = a.length - 1; i &gt; 0; i--) {&amp;#10; j = Math.floor(Math.random() * (i + 1));&amp;#10; x = a[i];&amp;#10; a[i] = a[j];&amp;#10; a[j] = x;&amp;#10; }&amp;#10; return a;&amp;#10;}&amp;#10;&amp;#10;&amp;#10;available_items_shuffle = shuffle(available_items)&amp;#10;&amp;#10;items_list_1 = available_items_shuffle.slice(0, 5)&amp;#10;items_list_2 = available_items_shuffle.slice(5, 10)&amp;#10;items_list_3 = available_items_shuffle.slice(10, 15)" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="used_items = []&amp;#10;available_items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];&amp;#10;&amp;#10;&amp;#10;&amp;#10;function shuffle(a) {&amp;#10; var j, x, i;&amp;#10; for (i = a.length - 1; i &gt; 0; i--) {&amp;#10; j = Math.floor(Math.random() * (i + 1));&amp;#10; x = a[i];&amp;#10; a[i] = a[j];&amp;#10; a[j] = x;&amp;#10; }&amp;#10; return a;&amp;#10;}&amp;#10;&amp;#10;&amp;#10;available_items_shuffle = shuffle(available_items)&amp;#10;&amp;#10;items_list_1 = available_items_shuffle.slice(0, 5)&amp;#10;items_list_2 = available_items_shuffle.slice(5, 10)&amp;#10;items_list_3 = available_items_shuffle.slice(10, 15)&amp;#10;&amp;#10;items_list_1_shuffle = shuffle(items_list_1)&amp;#10;items_list_2_shuffle = shuffle(items_list_2)&amp;#10;items_list_3_shuffle = shuffle(items_list_3)&amp;#10;&amp;#10;feedback_list_1 = items_list_1_shuffle.slice(0,3)&amp;#10;feedback_list_2 = items_list_2_shuffle.slice(0,3)&amp;#10;feedback_list_3 = items_list_3_shuffle.slice(0,3)" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="JS" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
......@@ -443,7 +443,7 @@
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="function shuffle(a) {&amp;#10; var j, x, i;&amp;#10; for (i = a.length - 1; i &gt; 0; i--) {&amp;#10; j = Math.floor(Math.random() * (i + 1));&amp;#10; x = a[i];&amp;#10; a[i] = a[j];&amp;#10; a[j] = x;&amp;#10; }&amp;#10; return a;&amp;#10;}&amp;#10;&amp;#10;cur_items_shuffle = shuffle(cur_items)&amp;#10;&amp;#10;feedback_list_1 = cur_items_shuffle.slice(0, 3)&amp;#10;feedback_list_2 = cur_items_shuffle.slice(0, 3)&amp;#10;feedback_list_3 = cur_items_shuffle.slice(0, 3)" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="Py" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
......@@ -476,7 +476,7 @@
<Param name="stopType" updates="None" val="duration (s)" valType="str"/>
<Param name="stopVal" updates="constant" val="" valType="code"/>
<Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
<Param name="text" updates="constant" val="$Feedback_Items" valType="str"/>
<Param name="text" updates="constant" val="$Items" valType="str"/>
<Param name="units" updates="None" val="from exp settings" valType="str"/>
<Param name="wrapWidth" updates="constant" val="" valType="code"/>
</TextComponent>
......
......@@ -263,7 +263,7 @@ function experimentInit() {
text_10 = new visual.TextStim({
win: psychoJS.window,
name: 'text_10',
text: Feedback_Items,
text: Items,
font: 'Arial',
units : undefined,
pos: [0, 0], height: 0.05, wrapWidth: undefined, ori: 0,
......@@ -329,6 +329,12 @@ var available_items_shuffle;
var items_list_1;
var items_list_2;
var items_list_3;
var items_list_1_shuffle;
var items_list_2_shuffle;
var items_list_3_shuffle;
var feedback_list_1;
var feedback_list_2;
var feedback_list_3;
var introComponents;
function introRoutineBegin() {
//------Prepare to start Routine 'intro'-------
......@@ -360,6 +366,14 @@ function introRoutineBegin() {
items_list_1 = available_items_shuffle.slice(0, 5)
items_list_2 = available_items_shuffle.slice(5, 10)
items_list_3 = available_items_shuffle.slice(10, 15)
items_list_1_shuffle = shuffle(items_list_1)
items_list_2_shuffle = shuffle(items_list_2)
items_list_3_shuffle = shuffle(items_list_3)
feedback_list_1 = items_list_1_shuffle.slice(0,3)
feedback_list_2 = items_list_2_shuffle.slice(0,3)
feedback_list_3 = items_list_3_shuffle.slice(0,3)
// keep track of which components have finished
introComponents = [];
introComponents.push(text_3);
......@@ -1031,27 +1045,20 @@ function prime_descriptionRoutineEnd() {
key_resp_2.stop();
cur_items = [];
feedback_items = [];
if (Prime == 1) {
cur_items = items_list_1;
feedback_items = feedback_list_1
}
if (Prime == 2) {
cur_items = items_list_2;
}
if (Prime == 3) {
cur_items = items_list_3;
}
feedback_items = [];
if (Prime == 1) {
feedback_items = feedback_list_1;
}
if (Prime == 2) {
feedback_items = feedback_list_2;
}
if (Prime == 3) {
cur_items = items_list_3;
feedback_items = feedback_list_3;
}
// the Routine "prime_description" was not non-slip safe, so reset the non-slip timer
routineTimer.reset();
......
......@@ -255,7 +255,7 @@ function experimentInit() {
text_10 = new visual.TextStim({
win: psychoJS.window,
name: 'text_10',
text: Feedback_Items,
text: Items,
font: 'Arial',
units : undefined,
pos: [0, 0], height: 0.05, wrapWidth: undefined, ori: 0,
......@@ -321,6 +321,12 @@ var available_items_shuffle;
var items_list_1;
var items_list_2;
var items_list_3;
var items_list_1_shuffle;
var items_list_2_shuffle;
var items_list_3_shuffle;
var feedback_list_1;
var feedback_list_2;
var feedback_list_3;
var introComponents;
function introRoutineBegin() {
//------Prepare to start Routine 'intro'-------
......@@ -352,6 +358,14 @@ function introRoutineBegin() {
items_list_1 = available_items_shuffle.slice(0, 5)
items_list_2 = available_items_shuffle.slice(5, 10)
items_list_3 = available_items_shuffle.slice(10, 15)
items_list_1_shuffle = shuffle(items_list_1)
items_list_2_shuffle = shuffle(items_list_2)
items_list_3_shuffle = shuffle(items_list_3)
feedback_list_1 = items_list_1_shuffle.slice(0,3)
feedback_list_2 = items_list_2_shuffle.slice(0,3)
feedback_list_3 = items_list_3_shuffle.slice(0,3)
// keep track of which components have finished
introComponents = [];
introComponents.push(text_3);
......@@ -1034,27 +1048,20 @@ function prime_descriptionRoutineEnd() {
key_resp_2.stop();
cur_items = [];
feedback_items = [];
if (Prime == 1) {
cur_items = items_list_1;
feedback_items = feedback_list_1
}
if (Prime == 2) {
cur_items = items_list_2;
}
if (Prime == 3) {
cur_items = items_list_3;
}
feedback_items = [];
if (Prime == 1) {
feedback_items = feedback_list_1;
}
if (Prime == 2) {
feedback_items = feedback_list_2;
}
if (Prime == 3) {
cur_items = items_list_3;
feedback_items = feedback_list_3;
}
// the Routine "prime_description" was not non-slip safe, so reset the non-slip timer
routineTimer.reset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment