MCPcopy Create free account
hub / github.com/AdRoll/rustenstein / new

Method new

src/map.rs:35–45  ·  view source on GitHub ↗
(
        plane0: [[u16; MAP_HEIGHT]; MAP_WIDTH],
        plane1: [[u16; MAP_HEIGHT]; MAP_WIDTH],
        name: String,
    )

Source from the content-addressed store, hash-verified

33
34impl Map {
35 pub fn new(
36 plane0: [[u16; MAP_HEIGHT]; MAP_WIDTH],
37 plane1: [[u16; MAP_HEIGHT]; MAP_WIDTH],
38 name: String,
39 ) -> Self {
40 Self {
41 plane0,
42 plane1,
43 name,
44 }
45 }
46
47 pub fn tile_at(&self, x: u8, y: u8) -> Tile {
48 let tile = self.plane0[x as usize][y as usize];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected