changed the last double variables and values to float and add more hints to readme

This commit is contained in:
muebau
2024-05-26 11:01:57 +02:00
parent 5f0c6fce74
commit caf0a5bbe8
4 changed files with 7 additions and 7 deletions

View File

@@ -107,7 +107,7 @@ public:
rating->score = (aHeight * (rating->aggregatedHeight)) + (fullLines * (rating->fullLines)) + (holes * (rating->holes)) + (bumpiness * (rating->bumpiness));
}
TetrisAI(): TetrisAI(-0.510066, 0.760666, -0.35663, -0.184483)
TetrisAI(): TetrisAI(-0.510066f, 0.760666f, -0.35663f, -0.184483f)
{}
TetrisAI(float aHeight, float fullLines, float holes, float bumpiness):
@@ -178,9 +178,9 @@ public:
if(findWorstMove)
{
//init rating for worst
if(bestRating->score == -DBL_MAX)
if(bestRating->score == -FLT_MAX)
{
bestRating->score = DBL_MAX;
bestRating->score = FLT_MAX;
}
// update if we found a worse one