Example #1
0
def test_live():
    snake = Snake()
    game = Game()

    snake.position = [100, 50]

    game.dead(snake)
    assert (game.run == True)
Example #2
0
def test_dead_in_top():
    snake = Snake()
    game = Game()

    snake.position = [512, 50]

    game.dead(snake)
    assert (game.run == False)
Example #3
0
def test_dead_in_right():
    snake = Snake()
    game = Game()

    snake.position = [200, 0]

    game.dead(snake)
    assert (game.run == False)