[messages] [Developers] autolayout for "hand"
spotlight2001
waltermauritz at gmx.at
Sat May 13 22:00:07 CEST 2017
I have just written an autolayout function for the "hand":
http://imgur.com/a/48XaD[1]
Plz notice the button autolyout
i dont have a branch yet, because I developed on trunk and have just
asked for branch write permissions.
This started from a copy of PieceRecenterer.java, which does something
similar - rearrange cards
Heres my question:
I have this prototyping code which i need to get rid of:
Code:
for (GamePiece p : pieces) {
String type = null;
// TODO get type in a generic way from gamepiece
if (p.getType().contains("Strategy Card")) {
type = "strategy card";
} else if (p.getType().contains("Battle Card")) {
type = "battle card";
} else {
// ignore other types
}
How can I get the prototype name in a generic way?
Btw. the GamePiece class type is: "SetGlobalProperty"
Just for the hannibal game, which is not from me, a proto is called
"Strategy Card", and another one "Battle Card"
[1] http://imgur.com/a/48XaD
_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=53633#p53633
More information about the messages
mailing list