mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 03:15:48 -06:00
22 lines
593 B
Rust
22 lines
593 B
Rust
use pacman::constants::RAW_BOARD;
|
|
use pacman::map::Map;
|
|
|
|
#[test]
|
|
fn test_game_map_creation() {
|
|
let map = Map::new(RAW_BOARD).unwrap();
|
|
|
|
assert!(map.graph.node_count() > 0);
|
|
assert!(!map.grid_to_node.is_empty());
|
|
|
|
// Should find Pac-Man's starting position
|
|
let pacman_pos = map.find_starting_position(0);
|
|
assert!(pacman_pos.is_some());
|
|
}
|
|
|
|
#[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).unwrap();
|
|
assert!(map.find_starting_position(0).is_some());
|
|
}
|