public List<Integer> legalMoves() {
		List<Integer> result = new ArrayList<Integer>();
		for (int r = 0; r < WIDTH; r++) {
			for (int c = 0; c < WIDTH; c++) {
				if (squares[r][c] == '.') {
					for (int[] offset : OFFSETS) {
						int dr = offset[0];
						int dc = offset[1];
						if (flips(r, c, dr, dc) > 0) {
							result.add(r * WIDTH + c);
							break;
						}
					}
				}
			}
		}
		if (result.isEmpty()) {
			result.add(PASS);
		}
		return result;
	}