Comment detail

出力の一時停止と再開 (Nested Flatten)
標準出力といえるかかなり微妙ですが、Processing で。ウィンドウ中央に適当な色で a を書き続けます。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
boolean pause = false;

void setup(){
  size(200,200);
  frameRate(1);
  // "Processing -> Tools -> Create Font ..." and save "Courier-48.vlw" 
  PFont font = loadFont("Courier-48.vlw");
  textFont(font, 48);
  textAlign(CENTER);
}

void draw() {
  if (! pause) {
    fill(random(255),random(255),random(255));
    text("a", width/2, height/2);
  }
}

void keyPressed() {
  switch (key) {
    case 'p':
      pause = !pause;
      break;
    case 'q':
      fill(0, 30);
      text("quit", width/2, height/2);
      exit();
      break;
  }
}

Index

Feed

Other

Link

Pathtraq

loading...