Exemple #1
0
def __glob_test():
    g = TokenGrid( 10, 10 )

    assert( g.placeToken( Glob(), (5, 5) ) )
    assert( g.placeToken( Glob(), (5, 6) ) )
    assert( g.placeToken( Glob(), (5, 7) ) )
    assert( g.placeToken( Glob(), (6, 8) ) )
    assert( not g.placeToken( Glob(), (1,1) ) )
    assert( g.frequencyHistogram()['Glob'] == 4 ) 
Exemple #2
0
def __assassin_test():
    g = TokenGrid(10, 10)
    
    assert( g.placeToken( Assassin(), (3,3) ) )
    assert( g.placeToken( Assassin(), (5,5) ) )
    assert( g.frequencyHistogram()[InvisibleToken().name()] == 2 ) 
Exemple #3
0
def __brick_test():
    g = TokenGrid( 10, 10 )
    assert( g.placeToken( Brick(), (5, 5) ) ) 
    assert( g.frequencyHistogram()[Brick().name()] == 9 )