@@ -841,25 +841,27 @@ export class QuincunxGame extends GameBase {
841841 const areas : AreaPieces [ ] = [ ] ;
842842 for ( let p = 1 ; p <= this . numplayers ; p ++ ) {
843843 const hand = [ ...this . hands [ p - 1 ] ] ;
844- if ( ! hand . includes ( "" ) ) {
845- const sorted = hand . map ( uid => Card . deserialize ( uid ) ! ) . sort ( cardSortAsc ) . map ( c => c . uid ) . sort ( ( a , b ) => {
846- if ( this . masked . includes ( a ) && this . masked . includes ( b ) ) {
847- return 0 ;
848- } else if ( this . masked . includes ( a ) ) {
849- return 1
850- } else if ( this . masked . includes ( b ) ) {
851- return - 1 ;
852- } else {
853- return 0 ;
854- }
855- } ) . map ( c => this . masked . includes ( c ) ? "cUNKNOWN" : ( "c" + c ) ) ;
856- areas . push ( {
857- type : "pieces" ,
858- pieces : sorted as [ string , ...string [ ] ] ,
859- label : i18next . t ( "apgames:validation.jacynth.LABEL_STASH" , { playerNum : p } ) || `P${ p } Hand` ,
860- spacing : 0.5 ,
861- width : width < 6 ? 6 : undefined ,
862- } ) ;
844+ if ( hand . length > 0 ) {
845+ if ( ! hand . includes ( "" ) ) {
846+ const sorted = hand . map ( uid => Card . deserialize ( uid ) ! ) . sort ( cardSortAsc ) . map ( c => c . uid ) . sort ( ( a , b ) => {
847+ if ( this . masked . includes ( a ) && this . masked . includes ( b ) ) {
848+ return 0 ;
849+ } else if ( this . masked . includes ( a ) ) {
850+ return 1
851+ } else if ( this . masked . includes ( b ) ) {
852+ return - 1 ;
853+ } else {
854+ return 0 ;
855+ }
856+ } ) . map ( c => this . masked . includes ( c ) ? "cUNKNOWN" : ( "c" + c ) ) ;
857+ areas . push ( {
858+ type : "pieces" ,
859+ pieces : sorted as [ string , ...string [ ] ] ,
860+ label : i18next . t ( "apgames:validation.jacynth.LABEL_STASH" , { playerNum : p } ) || `P${ p } Hand` ,
861+ spacing : 0.5 ,
862+ width : width < 6 ? 6 : undefined ,
863+ } ) ;
864+ }
863865 }
864866 }
865867 // create an area for all invisible cards (if there are any cards left)
0 commit comments