Skip to content

Commit

Permalink
no need to track player new departments
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Dec 6, 2023
1 parent ce9fc75 commit 7484928
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/round/DebugInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Discard: <span v-for="(discard,index) of cardDeck.discardPile" :key="index">{{index}}: {{(discard ?? []).map(card => cardInfo(card))}}&nbsp;</span><br/>
<b>Departments</b><br/>
Available: {{navigationState.departments}}({{navigationState.departments.length}})<br/>
Player: {{navigationState.playerDepartments}}({{navigationState.playerDepartments.length}}) + {{navigationState.playerNewDepartments}}({{navigationState.playerNewDepartments.length}}),
Player: {{navigationState.playerDepartments}}({{navigationState.playerDepartments.length}}),
Reserve: {{navigationState.playerReserveDepartments}}({{navigationState.playerReserveDepartments.length}})<br/>
Bot: {{navigationState.botDepartments}}({{navigationState.botDepartments.length}}) + {{navigationState.botNewDepartments}}({{navigationState.botNewDepartments.length}})<br/>
<b>Bot</b><br/>
Expand Down
7 changes: 3 additions & 4 deletions src/components/round/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ export default defineComponent({
return this.navigationState.round
},
availableDepartments() : string[] {
return [...removeDepartments(this.navigationState.departments,
this.navigationState.playerNewDepartments, this.navigationState.botNewDepartments)]
return [...removeDepartments(this.navigationState.departments, this.navigationState.botNewDepartments)]
},
playerReserveDepartments() : string[] {
return [...removeDepartments(this.navigationState.playerReserveDepartments,this.navigationState.playerNewDepartments)]
return [...this.navigationState.playerReserveDepartments]
},
playerDepartments() : string[] {
return [...addDepartments(this.navigationState.playerDepartments,this.navigationState.playerNewDepartments)]
return [...this.navigationState.playerDepartments]
},
botDepartments() : string[] {
return [...addDepartments(this.navigationState.botDepartments,this.navigationState.botNewDepartments)]
Expand Down
3 changes: 0 additions & 3 deletions src/util/NavigationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default class NavigationState {
readonly departments : readonly string[]
readonly playerReserveDepartments : readonly string[]
readonly playerDepartments : readonly string[]
readonly playerNewDepartments : readonly string[]
readonly botDepartments : readonly string[]
readonly botNewDepartments : readonly string[]
readonly selectedAction? : Action
Expand All @@ -38,7 +37,6 @@ export default class NavigationState {
let botDepartments : readonly string[] = []
let selectedAction : Action|undefined
let botEventDonationFailed = false
const playerNewDepartments : readonly string[] = []
let botNewDepartments : readonly string[] = []
let botCardShift : number = 0

Expand Down Expand Up @@ -68,7 +66,6 @@ export default class NavigationState {
this.departments = departments
this.playerReserveDepartments = playerReserveDepartments
this.playerDepartments = playerDepartments
this.playerNewDepartments = playerNewDepartments
this.botDepartments = botDepartments
this.botNewDepartments = botNewDepartments
this.selectedAction = selectedAction
Expand Down

0 comments on commit 7484928

Please sign in to comment.