Start of major refactor

This commit is contained in:
Seoxi Ryouko
2025-03-01 19:55:15 -06:00
parent e0eb67b299
commit e329b1f223
8 changed files with 349 additions and 529 deletions

View File

@ -6,6 +6,7 @@
console.log it
it
) .catch err
window.fetch-post = fetch-post
const $opponent-hand = document.query-selector '#opponent-hand'
const $own-hand = document.query-selector '#own-hand'
const $view-card = document.query-selector '#view-card'
@ -51,7 +52,8 @@
const get-play-size = -> $play.get-bounding-client-rect!
const gen-array = -> Array.from { length: it }, (_, i) -> i
const gen-array-of = (it, val) -> Array.from { length: it }, -> val
const cards = await fetch \./cards.json .then (.json!)
const cards = await fetch \/cards.json .then (.json!)
window.cards = cards
const $make-card = ->
$img = document.create-element \img
$img.src = it