From c0d32b6dc38302d420e8a0ec46461d596e3e4637 Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Fri, 4 Sep 2020 22:14:27 -0600 Subject: [PATCH] removed explicit indexing, since changing to an array of objects fixed the ordering problem already --- index.html | 3 --- jokers.ddf | 8 -------- standardfaces.ddf | 4 ---- uno.ddf | 12 ------------ 4 files changed, 27 deletions(-) diff --git a/index.html b/index.html index 1b79db6..817e08f 100644 --- a/index.html +++ b/index.html @@ -27,9 +27,6 @@ function updateEvent() { function generateDeck(DDF) { var cards = [""]; - DDF.sort(function (a,b) { - return a.dataIndex - b.dataIndex; - }); DDF.forEach( function (dataBlock) { var tempcards = []; cards.forEach( function (current) { diff --git a/jokers.ddf b/jokers.ddf index 019bfbe..987cd29 100644 --- a/jokers.ddf +++ b/jokers.ddf @@ -1,22 +1,14 @@ [ [{ - "dataIndex":0, - "name":"value", "data":[ "A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"] }, { - "dataIndex":1, - "name":"suit", "data":[ "♥", "♣", "♠", "♦" ] }], [{ - "dataIndex":0, - "name":"color", "data":["red ", "black "] }, { - "dataIndex":1, - "name":"joker", "data":["joker"] }] ] diff --git a/standardfaces.ddf b/standardfaces.ddf index 104f032..59dab3f 100644 --- a/standardfaces.ddf +++ b/standardfaces.ddf @@ -1,12 +1,8 @@ [ { - "dataIndex":0, - "name":"value", "data":[ "A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"] }, { - "dataIndex":1, - "name":"suit", "data":[ "♥", "♣", "♠", "♦" ] } ] diff --git a/uno.ddf b/uno.ddf index 8c55a52..1585813 100644 --- a/uno.ddf +++ b/uno.ddf @@ -1,32 +1,20 @@ [ [{ - "dataIndex":0, - "name":"color", "data":[ "
"] }, { - "dataIndex":2, - "name":"value", "data":[ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "⮌

Reverse", "⊘

skip", "+2

Draw 2"] }, { - "dataIndex":3, - "name":"end", "data":["

"] }], [{ - "dataIndex":0, - "name":"draw4", "data":["
"] }, { - "dataIndex":1, - "name":"cards", "data":[ "+4

Draw 4

", "+4

Draw 4", "+4

Draw 4", "+4

Draw 4"] }] ]