Skip to content

Commit

Permalink
Merge branch 'release/1.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Jan 8, 2025
2 parents 59e89b5 + 32f6405 commit 150c898
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brdgm/civolution-solo-helper",
"version": "1.1.5",
"version": "1.1.6",
"private": true,
"description": "Civolution Solo Helper",
"appDeployName": "civolution",
Expand Down
5 changes: 1 addition & 4 deletions src/util/NavigationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class NavigationState {
redDotCount = 0
}
// draw next card, count dots
if (this.player == Player.BOT) {
if (this.player == Player.BOT && route.name == 'TurnBot') {
const nextCard = this.cardDeck.draw()
this.blueDotCount = blueDotCount + nextCard.blueDotCount
this.redDotCount = redDotCount + nextCard.redDotCount
Expand Down Expand Up @@ -147,9 +147,6 @@ function getPreviousBotPersistence(state: State, round: number, turn: number) :
if (round > 1) {
const lastRoundBotPersistence = getPreviousBotPersistence(state, round - 1, MAX_TURN)
if (lastRoundBotPersistence) {
// reset dot counters for new round
lastRoundBotPersistence.blueDotCount = 0
lastRoundBotPersistence.redDotCount = 0
return lastRoundBotPersistence
}
}
Expand Down
5 changes: 1 addition & 4 deletions tests/unit/services/BotActions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ describe('services/BotActions', () => {
const navigationState = new NavigationState(route, getState(DifficultyLevel.BEGINNER))

const botActions = new BotActions(Cards.get(13), navigationState)
expect(botActions.isReset).to.eq(false)
expect(botActions.items).to.eql([
{ action: Action.GAIN_VP, count: 4 }
])
expect(botActions.isReset).to.eq(true)
})

it('scoringActions-last-era-scoring-category', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/util/NavigationState.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ describe('util/NavigationState', () => {
expect(navigationState.cardDeck.toPersistence()).to.eql({pile:[4],discard:[3,2,1]})
expect(navigationState.evolutionCount).to.eq(2)
expect(navigationState.prosperityCount).to.eq(1)
expect(navigationState.blueDotCount).to.eq(2) // card3.blueDotCount = 2
expect(navigationState.redDotCount).to.eq(1) // card3.redDotCount = 1
expect(navigationState.blueDotCount).to.eq(5) // taken over from last round
expect(navigationState.redDotCount).to.eq(2) // taken over from last round
expect(navigationState.actionRoll).to.greaterThanOrEqual(1)
})

Expand Down

0 comments on commit 150c898

Please sign in to comment.