game workflow corrected
This commit is contained in:
@@ -140,7 +140,7 @@ export class BoardGenerationService {
|
||||
diceValue: number
|
||||
): number {
|
||||
// Calculate pattern modifier based on current position
|
||||
const patternModifier = this.getPatternModifier(currentPosition);
|
||||
const patternModifier = this.getPatternModifier(currentPosition, stepValue > 0);
|
||||
|
||||
// Calculate final position: currentPosition + (stepValue × dice) + patternModifier
|
||||
const movement = stepValue * diceValue;
|
||||
@@ -156,7 +156,7 @@ export class BoardGenerationService {
|
||||
return finalPosition;
|
||||
}
|
||||
|
||||
private getPatternModifier(position: number): number {
|
||||
private getPatternModifier(position: number, positiveField: boolean): number {
|
||||
// Pattern modifiers for strategic complexity:
|
||||
// - Positions ending in 0 (10, 20, 30...): No modifier
|
||||
// - Positions ending in 5 (15, 25, 35...): ±3 modifier
|
||||
@@ -167,11 +167,11 @@ export class BoardGenerationService {
|
||||
if (position % 10 === 0) {
|
||||
return 0; // Positions ending in 0
|
||||
} else if (position % 10 === 5) {
|
||||
return Math.random() < 0.5 ? 3 : -3; // Positions ending in 5
|
||||
return positiveField ? 3 : -3; // Positions ending in 5
|
||||
} else if (position % 3 === 0) {
|
||||
return Math.random() < 0.5 ? 2 : -2; // Divisible by 3
|
||||
return positiveField ? 2 : -2; // Divisible by 3
|
||||
} else if (position % 2 === 1) {
|
||||
return Math.random() < 0.5 ? 1 : -1; // Odd positions
|
||||
return positiveField ? 1 : -1; // Odd positions
|
||||
} else {
|
||||
return 0; // Other even positions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user