We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d14e3a commit e40fdb1Copy full SHA for e40fdb1
playing-cards-2-planes/Table.js
@@ -184,9 +184,9 @@ export class Table extends Container {
184
const cellIndex = freeCells[0];
185
const qb = this._getQuadrantBounds(cellIndex);
186
187
- // Random position within the cell
+ // Random X within the cell, Y fixed at cell center
188
const x = qb.minX + Math.random() * (qb.maxX - qb.minX);
189
- const y = qb.minY + Math.random() * (qb.maxY - qb.minY);
+ const y = (qb.minY + qb.maxY) / 2;
190
191
// Random rotation in range [-20, 20] degrees
192
const angle = Math.random() * 40 - 20;
0 commit comments