MCPcopy Index your code
hub / github.com/battlecode/battlecode-2018 / get_opposite

Function get_opposite

battlecode-engine/src/map/mapparser.rs:102–109  ·  view source on GitHub ↗
(sym: &Symmetry, loc: (usize, usize), width: usize, height: usize)

Source from the content-addressed store, hash-verified

100 None
101}
102fn get_opposite(sym: &Symmetry, loc: (usize, usize), width: usize, height: usize) -> Option<(usize, usize)> {
103 match sym {
104 &Symmetry::Horiz => Some((width - 1 - loc.0, loc.1)),
105 &Symmetry::Vert => Some((loc.0, height - 1 - loc.1)),
106 &Symmetry::Spiral => Some((width - 1 - loc.0, height - 1 - loc.1)),
107 &Symmetry::None => None
108 }
109}
110
111#[derive(Clone)]
112struct Thing {

Callers 1

parse_text_mapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected