mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 00:42:19 -07:00
[DeckList] Extract plain-text deck parser into own file
DeckList::loadFromStream_Plain was a 160-line god-method mixing deck clearing, name/comment detection, sideboard heuristics, set and multiplier extraction and normalization. The parsing logic moves verbatim into DeckListPlainText::parse() so it lives in a dedicated, testable unit; DeckList keeps a thin delegating wrapper and still refreshes the deck hash exactly as before (also on the empty-input path, to match cleanList's original behavior). The *F* foil suffix handling is relocated unchanged.
This commit is contained in:
parent
2486f73067
commit
d71b614c44
4 changed files with 217 additions and 154 deletions
|
|
@ -11,6 +11,7 @@ set(HEADERS
|
|||
libcockatrice/deck_list/deck_list_history_manager.h
|
||||
libcockatrice/deck_list/deck_list_node_tree.h
|
||||
libcockatrice/deck_list/deck_list_memento.h
|
||||
libcockatrice/deck_list/deck_list_plain_text_parser.h
|
||||
libcockatrice/deck_list/playmat_resolver.h
|
||||
libcockatrice/deck_list/sideboard_plan.h
|
||||
)
|
||||
|
|
@ -27,6 +28,7 @@ add_library(
|
|||
libcockatrice/deck_list/deck_list.cpp
|
||||
libcockatrice/deck_list/deck_list_history_manager.cpp
|
||||
libcockatrice/deck_list/deck_list_node_tree.cpp
|
||||
libcockatrice/deck_list/deck_list_plain_text_parser.cpp
|
||||
libcockatrice/deck_list/playmat_resolver.cpp
|
||||
libcockatrice/deck_list/sideboard_plan.cpp
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue