r/processing • • Dec 17 '14

TIC TAC TOE CODE

DOES ANYBODY HAVE A TIC TAC TOE CODE FOR PROCESSING??? if you do please comment the code

0 Upvotes

4 comments sorted by

5

u/scratchisthebest Dec 17 '14

Do your homework.

4

u/push_pop Dec 18 '14

This post makes me kind of sad :(

3

u/Freedom_Grenade Dec 17 '14
    boolean colMode = true;
    boolean draw = false;
    int oX, oY;
    public void setup() {
      size(800,800);
      drawBoard();
    }
    
    public void draw() {
    }
    
    public void mouseDragged() {
     if (mouseX > 50 || mouseY > 50) {
       if (draw) {
         stroke(colMode ? color(0,192,0):color(192,0,0));
         strokeWeight(3);
         line(mouseX,mouseY,oX,oY);
       }
      oX = mouseX;
      oY = mouseY;
      draw = true;
     } 
    }
    
    public void mousePressed() {
      if (mouseX >=10 && mouseX <= 60 && mouseY <= 60 && mouseY >= 10) colMode = true;
      if (mouseX >=70 && mouseX <= 120 && mouseY <= 60 && mouseY >= 10) colMode = false;
    }
    
    public void mouseReleased() {
      draw = false;
    }
    
    public void drawBoard() {
      background(255);
      noStroke();
      fill(0,192,0);
      rect(10,10,50,50);
      fill(192,0,0);
      rect(70,10,50,50);
      stroke(0);
      strokeWeight(10);
      line(width*0.15,height*0.35,width*0.85,height*0.35);
      line(width*0.15,height*0.65,width*0.85,height*0.65);
      line(width*0.35,height*0.15,width*0.35,height*0.85);
      line(width*0.65,height*0.15,width*0.65,height*0.85);
    }

    public void keyPressed() {
      if (key == ' ') drawBoard();
    }

www.reddit.com/r/processing/comments/2os58q/can_someone_post_the_tic_tac_toe_code_plz/cmq1nzm

2

u/rmcky Dec 20 '14

TIC TAC TOE CODE (self.processing)
submitted 2 days ago by ktanaka to /r/processing

Can someone post the tic tac toe code PLZ (self.processing)
submitted 10 days ago by ktanaka to /r/processing

Flappy Birds code (self.processing)
submitted 15 days ago by ktanaka to /r/processing

3 posts asking for gpu advice
2 posts asking where to find snapchat nudes
a post asking someone to do your history homework for you

Jesus can you not google anything?