Fix: Sustenence Effect, Player Corrected And Minor Fixes

This commit is contained in:
GabrieleRadice
2026-03-18 18:56:10 +01:00
parent acb915b611
commit 959341e421
4 changed files with 36 additions and 16 deletions
@@ -3,6 +3,7 @@ package it.polimi.ingsw.gc14.Model;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
class PlayerAddFoodTest {
@@ -19,5 +20,14 @@ class PlayerAddFoodTest {
p.addFood(-2);
new_val = p.getFoodValue();
assertEquals(-1, new_val); // chiedere prof (dovrebbe essere +3 expected)
p.addFood(1);
p.addFood(3);
p.removeFood(3);
assertEquals(0, p.getFoodValue());
p.addFood(4);
p.removeFood(p.getFoodValue());
assertEquals(0, p.getFoodValue());
}
}