Skip to content

Commit 45dd9e4

Browse files
authored
Remove Magic Workstation (MWS) (#1442)
1 parent d3c4ae5 commit 45dd9e4

File tree

6 files changed

+4
-44
lines changed

6 files changed

+4
-44
lines changed

.dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
data/*
2-
!data/mws.json
32
!data/scores.json
43
node_modules
54
frontend/lib

backend/hash.js

-12
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ const opts = {
1313
return parseInt(digest.slice(0, 10), 16).toString(32);
1414
}
1515
},
16-
mws: {
17-
algo: "md5",
18-
separator: "",
19-
prefix: "#",
20-
name(name) {
21-
return name.toUpperCase().replace(/[^A-Z]/g, "");
22-
},
23-
digest(digest) {
24-
return digest.slice(0, 8);
25-
}
26-
}
2716
};
2817

2918
function hash(deck, opts) {
@@ -53,6 +42,5 @@ function hash(deck, opts) {
5342
module.exports = function (deck) {
5443
return {
5544
cock: hash(deck, opts.cock),
56-
mws: hash(deck, opts.mws)
5745
};
5846
};

doc/design.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data: wrapper around the data folder
1010

1111
game: class
1212

13-
hash: create cockatrice/mws deck hashes
13+
hash: create cockatrice deck hashes
1414

1515
human: class
1616

frontend/src/export/magicWorkstation.js

-23
This file was deleted.

frontend/src/export/mtgo.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export default {
44
name: "MTGO",
55
download,
66
downloadExtension: ".dek"
7-
/* If mtgo later supports clipboard import, define this: */
8-
// copy // NOTE - mtgo does not support import from clipboard
7+
/* If mtgo later supports clipboard import, enable this: */
8+
// copy
99
};
1010

1111
function download (name, deck) {

frontend/src/game/PlayersPanel.jsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ const PlayerTableHeader = () => (
3030
<th key="3">Drafter</th>
3131
<th key="4" className={columnVisibility("packs")}>Packs</th>
3232
<th key="5" className={columnVisibility("timer")}>Timer</th>
33-
<th key="6" className={columnVisibility("trice")}>Trice</th>
34-
<th key="7" className={columnVisibility("mws")}>MWS</th>
33+
<th key="6" className={columnVisibility("trice")}>Hash</th>
3534
</tr>
3635
);
3736

@@ -83,8 +82,6 @@ const columnVisibility = (columnName) => {
8382
return App.state.isGameFinished || !App.state.didGameStart || App.state.isSealed ? "hidden" : "";
8483
case "trice":
8584
return !App.state.isGameFinished ? "hidden" : "";
86-
case "mws":
87-
return !App.state.isGameFinished ? "hidden" : "";
8885
default:
8986
return "";
9087
}
@@ -118,7 +115,6 @@ const PlayerEntry = ({player, index}) => {
118115
<td key={3} className={columnVisibility("packs")} >{packs}</td>,
119116
<td key={4} id={className==="self" ? "self-time":""} className={columnVisibility("timer")}>{time}</td>,
120117
<td key={5} className={columnVisibility("trice")}>{hash && hash.cock}</td>,
121-
<td key={6} className={columnVisibility("mws")}>{hash && hash.mws}</td>
122118
];
123119

124120
const selfTimeFixed = document.getElementById("self-time-fixed-time");

0 commit comments

Comments
 (0)