soukoban 0.1.4

A library provides the implementation of some algorithms and data structures related to Sokoban
Documentation
1
2
3
4
5
6
7
8
use std::{fs, path::Path};

use soukoban::Level;

pub fn load_level_from_file<P: AsRef<Path>>(path: P, id: usize) -> Level {
    debug_assert!(id >= 1);
    Level::load_nth_from_str(&fs::read_to_string(path).unwrap(), id).unwrap()
}