Commit c6db2ac1 authored by fallenstardust's avatar fallenstardust

当副卡组item满20时不能再从额外卡组向副卡组拖入新item

parent 26352f1b
...@@ -244,11 +244,13 @@ class DeckDrager { ...@@ -244,11 +244,13 @@ class DeckDrager {
public boolean moveExtraToSide(int src, int to) { public boolean moveExtraToSide(int src, int to) {
int left = src - DeckItem.ExtraStart; int left = src - DeckItem.ExtraStart;
int right = to - DeckItem.SideStart; int right = to - DeckItem.SideStart;
int count = deckAdapater.getSideCount(); int sidecount = deckAdapater.getSideCount();
if (right >= count) { if (right >= sidecount) {
right = count - 1; right = sidecount - 1;
}
if (sidecount >= Constants.DECK_SIDE_MAX + 5) {
return false;
} }
//交换 //交换
DeckItem space = deckAdapater.removeItem(DeckItem.SideEnd); DeckItem space = deckAdapater.removeItem(DeckItem.SideEnd);
DeckItem deckItem = deckAdapater.removeItem(DeckItem.ExtraStart + left); DeckItem deckItem = deckAdapater.removeItem(DeckItem.ExtraStart + left);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment