วันอังคารที่ 28 ตุลาคม พ.ศ. 2557

XO table


void setup() {
  size(400, 400);
  int num = 3;//number of slot in line
  int [][]keep_XO_Table = new int[num][num];
  draw_G(keep_XO_Table[num-1]);
}
void draw_G(int []num) {
  for (int i = 0; i < num.length; i++) {
    for (int j = 0; j < num.length; j++) {
      stroke(0);
      fill(255);
      rect(i*(width/num.length), j*(height/num.length), width/num.length, height/num.length);
    }
  }
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น