mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2025-10-21 20:00:35 +00:00
refactor(ai): tests
This commit is contained in:
parent
aca113f562
commit
b762fe6774
@ -2,6 +2,7 @@ import unittest
|
||||
|
||||
import numpy as np
|
||||
from ai.fitness.peaks import get_peaks_sum
|
||||
from ai.fitness.transitions import get_row_transitions
|
||||
|
||||
|
||||
class TestFitness(unittest.TestCase):
|
||||
@ -29,3 +30,7 @@ class TestFitness(unittest.TestCase):
|
||||
)
|
||||
|
||||
self.assertEqual(get_peaks_sum(field), 2)
|
||||
def test_get_row_transistions(self):
|
||||
answers = (8, 0, 2)
|
||||
for field, answer in zip(self.fields, answers):
|
||||
self.assertEqual(get_row_transitions(field), answer)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user