CS 1

Lecture 12

Professor Devin Balkcom
devin@cs.dartmouth.edu
office: Sudikoff 211

http://www.cs.dartmouth.edu/~cs1

Reminders

  • All exams graded
  • Exam solutions posted
  • Lab 2 out Friday (but available now)
  • Lab help hours Thursday, Sunday

Life

Life

life.py

Each cell has eight neighbors: NW, N, NE, W, E, SW, S, SE. The rules:

  1. Cell alive, 0 or 1 living neigbors, die.
  2. Cell alive, 4 or more neighbors, die.
  3. Cell dead, exactly 3 living neighbors, cell is born.
  4. Otherwise, no change.

Software design

  1. Understand the problem.
  2. Design your program at a high level.
  3. Implement part of it in code.
  4. Test that part.
  5. Repeat.