Hand & Foot, Scopa, Casino: full SVG board via the shared helper
* cg-rummy.el (cg-rummy--board-svg): add :stock-label and a :discard 'none books and your hand/foot. * cg-scopa.el (cg-fish--svg, cg-fish--render-text): board with the table * NEWS: note the new boards.
This commit is contained in:
parent
585c4449a0
commit
2ee802f52d
5 changed files with 92 additions and 10 deletions
|
|
@ -876,6 +876,24 @@
|
|||
(should (rassoc '(hand . 0) regs))
|
||||
(should (cl-every (lambda (r) (= 4 (length (car r)))) regs)))))
|
||||
|
||||
(ert-deftest cgt-hf-svg-smoke ()
|
||||
(let ((g (cg-handfoot-game)))
|
||||
(cg-put g :nplayers 4) (cg-put g :nteams 2) (cg-put g :scores (make-vector 2 0))
|
||||
(cg-hf--deal g)
|
||||
(cg-put g :cursor 0) (cg-put g :message "x")
|
||||
(should (stringp (cg-hf--render-text g)))
|
||||
(let ((regs (get-text-property 0 'cg-regions (cg-hf--svg g))))
|
||||
(should (rassoc '(hand . 0) regs))
|
||||
(should (cl-every (lambda (r) (= 4 (length (car r)))) regs)))))
|
||||
|
||||
(ert-deftest cgt-fish-svg-smoke ()
|
||||
(let ((g (cg-scopa-game)))
|
||||
(cg-fish--deal-round g)
|
||||
(cg-put g :cursor 0) (cg-put g :message "x")
|
||||
(should (stringp (cg-fish--render-text g)))
|
||||
(should (rassoc '(hand . 0)
|
||||
(get-text-property 0 'cg-regions (cg-fish--svg g))))))
|
||||
|
||||
(ert-deftest cgt-pat-golf-deal ()
|
||||
(let ((g (cg-pat--deal (cg-golf-game))))
|
||||
(should (= 35 (length (cg-get g :cards))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue