Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. char[] pairs = {'a', 'c', 'b', 'd', 'd', 'a', 'b', 'c'};
  2. boolean[] base = {true, true, true, false, true, false, true, true};
  3. void setup() {
  4. size(800, 300);
  5. textSize(30);
  6. textAlign(CENTER, TOP);
  7. }
  8. void draw() {
  9. background(127);
  10. for(int i = 0; i < pairs.length ;i++){
  11. text(pairs[i], 50 + (width/pairs.length)*i , 180);
  12. if(base[i]==0){
  13. rect((width/pairs.length)*(i+1),200,(width/pairs.length),100);
  14. fill(0);
  15. }
  16. }
  17.  
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement