mirror of
https://github.com/guezoloic/racing-game.git
synced 2026-03-31 19:21:38 +00:00
fix: ajout multiple fonction Map / Game / Car
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user