summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-06-17 14:50:15 +0100
committerGitHub <noreply@github.com>2024-06-17 14:50:15 +0100
commitafd1567d20f4f17f271d0c9d3a7cd6f1188eba3f (patch)
treeef477a9fa084ea59e330da4d02803dc85da599d9 /play.js
parentf729ad5a4a13917215945277a49d6cee0312fb94 (diff)
download1989-dawn-of-freedom-afd1567d20f4f17f271d0c9d3a7cd6f1188eba3f.tar.gz
Update play.js
Another tweak to deal with new cards folders
Diffstat (limited to 'play.js')
-rw-r--r--play.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/play.js b/play.js
index fe2bee4..c2d11ed 100644
--- a/play.js
+++ b/play.js
@@ -286,7 +286,11 @@ function playCard(event) {
const eventPanel = document.getElementById('events');
const activeCard = document.createElement('img')
- activeCard.src = `images/e${playedCard}.gif`
+ if (playedCard < 100) {
+ activeCard.src = `cards/e${playedCard}.gif`
+ } else {
+ activeCard.src = `cards2/e${playedCard}.gif`
+ }
activeCard.className='playedCard'
activeCard.alt = `Card ${playedCard}`
eventPanel.appendChild(activeCard)