V
Size: a a a
V
R
R
R
V
R
P
R
R
R
G
R
currentDate()
и currentTime()
R
m
M
M
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
#include "../include/evolutiong_game/Cell/Coordinate.h"
#include "../include/evolutiong_game/Cell/Genes.h"
Coordinate current({5, 5});
Genes gene(up, down, right, left, up, down, predator, 150, 20, 300, 150, 30);
TEST_CASE("Проверка расчета новых координат") {
CHECK(current.getNewCoordinate(up)[0] == 5);
CHECK(current.getNewCoordinate(up)[1] == 4);
CHECK(current.getNewCoordinate(down)[0] == 5);
CHECK(current.getNewCoordinate(down)[1] == 6);
CHECK(current.getNewCoordinate(right)[0] == 6);
CHECK(current.getNewCoordinate(right)[1] == 5);
CHECK(current.getNewCoordinate(left)[0] == 4);
CHECK(current.getNewCoordinate(left)[1] == 5);
}
TEST_CASE("Test"){
CHECK(gene.getType() == predator);
}
M
M
M