If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. -- Gerald Weinberg, Weinberg’s Second Law
- 节省时间 -- 回归测试
- 可重复
- 更精确
- 更好的维护性
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. -- Gerald Weinberg, Weinberg’s Second Law
# coding: utf-8 | |
class Board | |
def initialize(c, r) | |
@column = c | |
@row = r | |
@board = c.times.map { Array.new(r,false)} | |
end | |
def fill!(c, r) | |
@board[c][r] = true; |