MCPcopy Create free account
hub / github.com/Card-Forge/forge / tap

Method tap

forge-gui-mobile/src/forge/card/CardZoom.java:218–247  ·  view source on GitHub ↗
(float x, float y, int count)

Source from the content-addressed store, hash-verified

216 }
217
218 @Override
219 public boolean tap(float x, float y, int count) {
220 if (mutateIconBounds != null && mutateIconBounds.contains(x, y)) {
221 if (showMerged) {
222 showMerged = false;
223 } else {
224 showMerged = true;
225 show(currentCard.getMergedCardsCollection(), 0, null);
226 }
227 return true;
228 }
229 if (flipIconBounds != null && flipIconBounds.contains(x, y)) {
230 if (currentCard.isFaceDown() && currentCard.getBackup() != null) {
231 if (currentCard.getBackup().hasBackSide() || currentCard.getBackup().isFlipCard() || currentCard.getBackup().hasSecondaryState()) {
232 show(currentCard.getBackup());
233 return true;
234 }
235 }
236 if (!showBackSide)
237 showAltState = !showAltState;
238 else
239 showBackSide = !showBackSide;
240 return true;
241 }
242 hide();
243 showBackSide = false;
244 showAltState = false;
245 showMerged = false;
246 return true;
247 }
248
249 @Override
250 public boolean fling(float velocityX, float velocityY) {

Callers 1

keyDownMethod · 0.95

Calls 9

showMethod · 0.95
getBackupMethod · 0.80
hasBackSideMethod · 0.80
hasSecondaryStateMethod · 0.80
containsMethod · 0.65
hideMethod · 0.65
isFaceDownMethod · 0.45
isFlipCardMethod · 0.45

Tested by

no test coverage detected