Skip to content

Commit

Permalink
add new faction 'Runeterra' and max version 5
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysomallos committed May 15, 2022
1 parent 2919c00 commit 962d35d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/DeckEncoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class DeckEncoder {
}
}

DeckEncoder.MAX_KNOWN_VERSION = 4
DeckEncoder.MAX_KNOWN_VERSION = 5
DeckEncoder.FORMAT = 1
DeckEncoder.INITIAL_VERSION = 1

Expand Down
3 changes: 2 additions & 1 deletion src/Faction.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ Faction.FACTIONS = {
BW: [6, 2],
MT: [9, 2],
SH: [7, 3],
BC: [10, 4]
BC: [10, 4],
RU: [12, 5]
}

module.exports = Faction
12 changes: 10 additions & 2 deletions test/deckCodesTestData.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,21 @@
"4:02DE002",
"5:03BW004"
]
}
,
},
{
"code": "CQAQEAIKBIKAAAA",
"cards": [
"3:01BC010",
"3:01BC020"
]
},
{
"code": "CUBAEAIKBIKAEAIMBIKAAAA",
"cards": [
"3:01BC010",
"3:01BC020",
"3:01RU010",
"3:01RU020"
]
}
]
4 changes: 4 additions & 0 deletions test/factions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ describe('Faction', () => {
it('should get correct faction version for BC', () => {
assert.strictEqual(Faction.getVersion('BC'), 4)
})

it('should get correct faction version for RU', () => {
assert.strictEqual(Faction.getVersion('RU'), 5)
})
})

0 comments on commit 962d35d

Please sign in to comment.