fix: ajout multiple fonction Map / Game / Car

This commit is contained in:
2025-10-30 19:08:56 +01:00
parent 23f56113b7
commit 974fa21c3d
4 changed files with 108 additions and 26 deletions

View File

@@ -35,12 +35,14 @@ public class Car {
*
* @return cette même instance (pour chaînage fluide)
*/
public Car makeMove()
public Car makeMove(int move)
{
pos++;
pos += move;
if (pos == loop)
{
round++;
pos %= (loop + 1); // Repart de 0 après avoir dépassé loop
pos = 0;
}
return this;
}