示例#1
0
def test_tideflat_map_with_both():
    tfm = TideflatMap(get_gnomemap(), get_simple_tideflat())

    # a few things to make sure they work:
    assert tfm.on_map((11, 11, 0))
    assert not tfm.on_map((16, 16, 0))

    assert tfm.in_water((11, 11, 0))
    assert tfm.allowable_spill_position((13, 13, 0))
示例#2
0
def test_tideflat_map_with_both():
    tfm = TideflatMap(get_gnomemap(), get_simple_tideflat())

    # a few things to make sure they work:
    assert tfm.on_map((11, 11, 0))
    assert not tfm.on_map((16, 16, 0))

    assert tfm.in_water((11, 11, 0))
    assert tfm.allowable_spill_position((13, 13, 0))
示例#3
0
def test_with_gnome_map():
    """
    simplest possible -- the all water map
    """
    # this should now work like a regular map
    tfm = TideflatMap(get_gnomemap(), None)

    # a few things to make sure they work:
    assert tfm.on_map((11, 11, 0))
    assert not tfm.on_map((16, 16, 0))

    assert tfm.in_water((11, 11, 0))

    assert tfm.allowable_spill_position((13, 13, 0))

    assert not tfm.allowable_spill_position((10.5, 10.5, 0))
示例#4
0
def test_with_gnome_map():
    """
    simplest possible -- the all water map
    """
    # this should now work like a regular map
    tfm = TideflatMap(get_gnomemap(), None)

    # a few things to make sure they work:
    assert tfm.on_map((11, 11, 0))
    assert not tfm.on_map((16, 16, 0))

    assert tfm.in_water((11, 11, 0))

    assert tfm.allowable_spill_position((13, 13, 0))

    assert not tfm.allowable_spill_position((10.5, 10.5, 0))