Beispiel #1
0
    def test_initFieldSizeFive(self):

        field = snake.initField(numRows=5, numCols=5)

        fieldTest = [['#', '#', '#', '#', '#'], ['#', '', '', '', '#'],
                     ['#', '', '', '', '#'], ['#', '', '', '', '#'],
                     ['#', '#', '#', '#', '#']]
        assert fieldTest == field
Beispiel #2
0
    def test_initFieldSizeTwenty(self):

        field = snake.initField(numRows=20)

        assert len(field) == 20
Beispiel #3
0
    def test_initFieldSizeFive(self):

        field = snake.initField(numRows=5)

        assert len(field) == 5
Beispiel #4
0
    def test_initFieldType(self):

        field = snake.initField()

        assert isinstance(field,list)
Beispiel #5
0
    def test_initFieldSize(self):

        field = snake.initField()

        assert len(field) == 3
Beispiel #6
0
    def test_initFieldSizeThree(self):

        field = snake.initField(numRows=3, numCols=3)

        fieldTest = [['#', '#', '#'], ['#', '', '#'], ['#', '#', '#']]
        assert fieldTest == field