Board and Card Games

General discussion for boardgames.stackexchange.com. Chat abou...
May 8, 2015 19:12
@murgatroid99 couldn't they pass fake symbols into either a ManaCostEntry or just a factory method for ManaCost?
May 8, 2015 19:04
how's that?
May 8, 2015 19:00
I might prefer the special-case mana cost implementation for that
May 8, 2015 19:00
and then they can't have any other elements with them
May 8, 2015 18:59
I did think about that, that only generic symbols can be allowed to be 0
May 8, 2015 18:54
okay, yeah, that's what I was thinking
May 8, 2015 18:50
for devotion, can't you just do symbol.colors().contains(color)?
May 8, 2015 18:47
okay, cool, thanks
May 8, 2015 18:41
Yeah, that sounds reasonable
May 8, 2015 18:36
A SymbolParser class might be useful, and mana cost parsing would basically just be doing that in a loop, so it probably wouldn't be too much more complex
May 8, 2015 18:26
yeah, you're right. I thought I would use it more later. I figured maybe you could return that type from parse
May 8, 2015 18:23
no it's cool, different views are always good to have
May 8, 2015 18:23
actually yeah, that's a good point about matching
May 8, 2015 18:21
I really like multisets
May 8, 2015 18:21
ugh yeah I guess
May 8, 2015 18:20
which I suppose really isn't a big deal
May 8, 2015 18:19
other than it's now O(n) for contains
May 8, 2015 18:19
how is that different from a multiset?
May 8, 2015 18:17
what should they get back?
May 8, 2015 18:17
what if they pass "{3}"
May 8, 2015 18:17
okay, yeah, I sort of did that in Solution 1
May 8, 2015 18:16
okay, well I have a partially finished interface-based Symbol implementation, maybe I'll finish that up
May 8, 2015 18:16
lol true
May 8, 2015 18:16
if they break the contract, yeah, I guess
May 8, 2015 18:15
maybe I'm worrying too much
May 8, 2015 18:14
make a purple symbol or something
May 8, 2015 18:14
like someone else could just implement Symbol if it was an interface
May 8, 2015 18:14
and people could pass bogus symbols to a ManaCost builder
May 8, 2015 18:13
my only issue with symbol interfaces is the creation of symbols could be public
May 8, 2015 18:13
I did actually consider making Symbol an interface
May 8, 2015 18:11
but I'd certainly be interested in hearing your suggestions
May 8, 2015 18:11
besides, the actual type of mana symbols seldom matters
May 8, 2015 18:11
I just didn't want to bloat the class with a bunch of 10-line files
May 8, 2015 18:07
okay, that's what I thought
May 8, 2015 18:05
do you have permission to do it?
May 8, 2015 18:05
okay, sure
May 8, 2015 18:04
@murgatroid99 It's true, I could do that, and that's sort of how I did it in my initial version, I just like the idea of having TwoPart symbols that are actually made up of two different Symbols.
May 8, 2015 18:02
@murgatroid99 yeah, I think I prefer that way too, I just wish there was a better way to make monocolor hybrid symbols
May 8, 2015 17:58
Hey @Rainbolt @murgatroid99, I have two new versions of the ManaCost/ Symbol implementation, let me know what you think! I also included a list of the benefits of each system (and links to the two branches) here: github.com/c0d3br34k3r/magic/issues/4#issuecomment-100300996
May 5, 2015 20:08
I do probably use it too much
May 5, 2015 20:06
I dont think switch is evil
May 5, 2015 20:05
@Rainbolt well my IDE produces a warning if you don't account for all types or don't have a default
May 5, 2015 20:03
@Rainbolt yeah, that's what I'm used to
May 5, 2015 19:59
also, length isn't the only thing that's important, though it's a good indicator
May 5, 2015 19:59
@Rainbolt @murgatroid99 okay, I'll make a branch or two on my repo and see what it looks like
May 5, 2015 19:56
I'm trying not to be biased
May 5, 2015 19:56
it seems simpler to me
May 5, 2015 19:55
Okay, well I'll think about this. I'm not trying to be frustrating, but I'm still trying to figure out why using the Symbol idea, with ColorlessSymbols, is a bad idea
May 5, 2015 19:54
yeah
May 5, 2015 19:53
that makes sense