open the file, using MyReader mr while (mr has more data) { input = mr.giveMeTheNextLine(); for each char in input { set the state of the cell in the next column of the current row (!? current row??) to... if '-' dead else alive } }
public void paintComponent(Graphics g) { super.paintComponent(g); myLife.paint(g); }
void loop() { for (;;) { // forever! if (running) step(); delay(); } } private void step() { whateverIsStepping.step(); display(); } private void delay() { try { Thread.sleep(50); // sleep for 50 msecs } catch (Exception e) {} }