feat!: implement proper error handling, drop most expect() & unwrap() usages

This commit is contained in:
2025-08-11 20:23:39 -05:00
parent 5e9bb3535e
commit 27079e127d
20 changed files with 555 additions and 194 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ use pacman::map::Map;
#[test]
fn test_game_map_creation() {
let map = Map::new(RAW_BOARD);
let map = Map::new(RAW_BOARD).unwrap();
assert!(map.graph.node_count() > 0);
assert!(!map.grid_to_node.is_empty());
@@ -16,6 +16,6 @@ fn test_game_map_creation() {
#[test]
fn test_game_score_initialization() {
// This would require creating a full Game instance, but we can test the concept
let map = Map::new(RAW_BOARD);
let map = Map::new(RAW_BOARD).unwrap();
assert!(map.find_starting_position(0).is_some());
}