Currently the generated piece get no rotation. so the game would be done without ever rotating any pieces
we should just get a random rotation between 0 and 3 to each pieces for some randomness
Currently the generated piece get no rotation. so the game would be done without ever rotating any pieces
we should just get a random rotation between 0 and 3 to each pieces for some randomness
Mat_02
self-assigned this 2023-05-16 10:43:12 +02:00
turnPiece c'est un boolean[][] il n'y a pas de methode Piece ^^
et surtout je ne pense pas que tu ai besoin de passer par un nouveau boolean[][]
tu dois juste prendre la piece déjà générée, puis faire un RotateRight(rand.nextInt(4));
genre
Piece _piece = new Piece(shape);
_piece.RotateRight(rand.nextInt(4));
ret.addPiece(_piece);
> boolean[][] turnPiece = shape;
> turnPiece.Piece.RotateRight(rand);
> ret.addPiece(new Piece(turnPiece));
turnPiece c'est un boolean[][] il n'y a pas de methode Piece ^^
et surtout je ne pense pas que tu ai besoin de passer par un nouveau boolean[][]
tu dois juste prendre la piece déjà générée, puis faire un RotateRight(rand.nextInt(4));
genre
```
Piece _piece = new Piece(shape);
_piece.RotateRight(rand.nextInt(4));
ret.addPiece(_piece);
```
tonitch
self-assigned this 2023-05-19 14:51:24 +02:00
Mat_02
was unassigned by tonitch2023-05-19 14:51:24 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently the generated piece get no rotation. so the game would be done without ever rotating any pieces
we should just get a random rotation between 0 and 3 to each pieces for some randomness
i m on it !
need some help cause i can't use call rotateRight
how? you should do
myiece.rotateRight(int)boolean[][] turnPiece = shape;
turnPiece.Piece.RotateRight(rand);
ret.addPiece(new Piece(turnPiece));
that's what i'm trying to do
turnPiece c'est un boolean[][] il n'y a pas de methode Piece ^^
et surtout je ne pense pas que tu ai besoin de passer par un nouveau boolean[][]
tu dois juste prendre la piece déjà générée, puis faire un RotateRight(rand.nextInt(4));
genre
#83