Stroop Task Programming
in
Programming Questions
•
1 year ago
For a course in college I have to create the Stroop Task. You see a word and you have to push a button to show in which color the word is presented. I have been trying to find a way to show a word to the screen, but all the things I've tried don't seem to work. I made an array of all the words and the goal is to show one word, the subject person pushes a key for the color and then the next word shows up. At this point I can't even seem to show the first word to the screen and I'm hoping maybe some of you can push me in the right direction.
The code is below:
- void setup() {
- size(400,400);
- background(255);
- stroke(0);
- smooth();
- }
- string[][] Woorden =
- {
- //4 neutrale rode woorden
- {"neutral", "Car", "red"},
- {"neutral", "Tree", "red"},
- {"neutral", "Window", "red"},
- {"neutral", "Cat", "red"},
- //4 neutrale groene woorden
- {"neutral", "Dog", "green"},
- {"neutral", "Mouse", "green"},
- {"neutral", "Cloud", "green"},
- {"neutral", "Key", "green"},
- //4 neutrale blauwe woorden
- {"neutral", "Door", "blue"},
- {"neutral", "Lamp", "blue"},
- {"neutral", "Glass", "blue"},
- {"neutral", "Button", "blue"},
- //4 neutrale gele woorden
- {"neutral", "Coat", "yellow"},
- {"neutral", "Rain", "yellow"},
- {"neutral", "Dress", "yellow"},
- {"neutral", "Shoe", "yellow"},
- //4 incongruente woorden
- {"incongruent", "Red", "yellow"},
- {"incongruent", "Green", "red"},
- {"incongruent", "Blue", "green"},
- {"incongruent", "Yellow", "blue"},
- //4 congruente woorden
- {"congruent", "Red", "red"},
- {"congruent", "Green", "green"},
- {"congruent", "Blue", "blue"},
- {"congruent", "Yellow", "yellow"},
- }
- void draw (){
- background(255);
- fill (0);
- //laat stroop zien
- text(Woorden[0][1],200,200);
- }
1