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

Function test_direction

bindings/python/test/engine_test.py:13–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 assert loc.planet == bc.Planet.Mars
12
13def test_direction():
14 assert bc.Direction.North.opposite() == bc.Direction.South
15 loc = bc.MapLocation(bc.Planet.Earth,1,2)
16 locne = loc.add(bc.Direction.Northeast)
17 assert locne.x == 2, locne.x
18 assert locne.y == 3, locne.y
19
20def test_controller():
21 c = bc.GameController.new_manager(bc.GameMap.test_map())

Callers

nothing calls this directly

Calls 2

addMethod · 0.95
oppositeMethod · 0.80

Tested by

no test coverage detected