This commit is contained in:
timeshifter
2024-02-02 15:14:46 +01:00
parent d49022f310
commit 331f16786c
6 changed files with 428 additions and 0 deletions
+9
View File
@@ -6,3 +6,12 @@ pub fn read_file(filename: &str) -> Vec<String> {
f.read_to_string(&mut buffer).unwrap();
buffer.lines().map(|s| s.to_owned()).collect()
}
pub fn read_grid(filename: &str) -> Vec<Vec<char>> {
let result = read_file(filename)
.into_iter()
.map(|line| line.chars().collect())
.collect();
result
}