(board: &Vec<Vec<char>>, i: usize, j: usize, c: char)
| 46 | } |
| 47 | |
| 48 | pub fn valid(board: &Vec<Vec<char>>, i: usize, j: usize, c: char) -> bool { |
| 49 | let ibase = i / 3 * 3; |
| 50 | let jbase = j / 3 * 3; |
| 51 | for offset in 0..9 { |
| 52 | if board[offset][j] == c { return false } |
| 53 | if board[i][offset] == c { return false } |
| 54 | if board[ibase + offset / 3][jbase + offset % 3] == c { |
| 55 | return false |
| 56 | } |
| 57 | } |
| 58 | true |
| 59 | } |
| 60 | |
| 61 | pub fn pb(board: &Vec<Vec<char>>) { |
| 62 | println!("{}", format!( |
nothing calls this directly
no outgoing calls
no test coverage detected