public void assertStep1() {
    boolean fujaba__Success = false;

    // // result situation:
    // story pattern
    try {
      fujaba__Success = false;

      // check object artjom is really bound
      JavaSDM.ensure(artjom != null, "check object artjom is really bound");
      // check object artjomStore is really bound
      JavaSDM.ensure(artjomStore != null, "check object artjomStore is really bound");
      // check object pit10 is really bound
      JavaSDM.ensure(pit10 != null, "check object pit10 is really bound");
      // check object pit11 is really bound
      JavaSDM.ensure(pit11 != null, "check object pit11 is really bound");
      // check object pit12 is really bound
      JavaSDM.ensure(pit12 != null, "check object pit12 is really bound");
      // check object pit1 is really bound
      JavaSDM.ensure(pit1 != null, "check object pit1 is really bound");
      // check object pit2 is really bound
      JavaSDM.ensure(pit2 != null, "check object pit2 is really bound");
      // check object pit3 is really bound
      JavaSDM.ensure(pit3 != null, "check object pit3 is really bound");
      // check object pit4 is really bound
      JavaSDM.ensure(pit4 != null, "check object pit4 is really bound");
      // check object pit5 is really bound
      JavaSDM.ensure(pit5 != null, "check object pit5 is really bound");
      // check object pit6 is really bound
      JavaSDM.ensure(pit6 != null, "check object pit6 is really bound");
      // check object pit7 is really bound
      JavaSDM.ensure(pit7 != null, "check object pit7 is really bound");
      // check object pit8 is really bound
      JavaSDM.ensure(pit8 != null, "check object pit8 is really bound");
      // check object pit9 is really bound
      JavaSDM.ensure(pit9 != null, "check object pit9 is really bound");
      // check object turn is really bound
      JavaSDM.ensure(turn != null, "check object turn is really bound");
      // check object ulno is really bound
      JavaSDM.ensure(ulno != null, "check object ulno is really bound");
      // check object ulnoStore is really bound
      JavaSDM.ensure(ulnoStore != null, "check object ulnoStore is really bound");
      // check object visitor is really bound
      JavaSDM.ensure(visitor != null, "check object visitor is really bound");
      // check isomorphic binding between objects ulno and artjom
      JavaSDM.ensure(
          !ulno.equals(artjom), "check isomorphic binding between objects ulno and artjom");

      // check isomorphic binding between objects ulnoStore and artjomStore
      JavaSDM.ensure(
          !ulnoStore.equals(artjomStore),
          "check isomorphic binding between objects ulnoStore and artjomStore");

      // check isomorphic binding between objects pit11 and pit10
      JavaSDM.ensure(
          !pit11.equals(pit10), "check isomorphic binding between objects pit11 and pit10");

      // check isomorphic binding between objects pit12 and pit10
      JavaSDM.ensure(
          !pit12.equals(pit10), "check isomorphic binding between objects pit12 and pit10");

      // check isomorphic binding between objects pit10 and pit1
      JavaSDM.ensure(
          !pit10.equals(pit1), "check isomorphic binding between objects pit10 and pit1");

      // check isomorphic binding between objects pit2 and pit10
      JavaSDM.ensure(
          !pit2.equals(pit10), "check isomorphic binding between objects pit2 and pit10");

      // check isomorphic binding between objects pit3 and pit10
      JavaSDM.ensure(
          !pit3.equals(pit10), "check isomorphic binding between objects pit3 and pit10");

      // check isomorphic binding between objects pit4 and pit10
      JavaSDM.ensure(
          !pit4.equals(pit10), "check isomorphic binding between objects pit4 and pit10");

      // check isomorphic binding between objects pit5 and pit10
      JavaSDM.ensure(
          !pit5.equals(pit10), "check isomorphic binding between objects pit5 and pit10");

      // check isomorphic binding between objects pit6 and pit10
      JavaSDM.ensure(
          !pit6.equals(pit10), "check isomorphic binding between objects pit6 and pit10");

      // check isomorphic binding between objects pit7 and pit10
      JavaSDM.ensure(
          !pit7.equals(pit10), "check isomorphic binding between objects pit7 and pit10");

      // check isomorphic binding between objects pit8 and pit10
      JavaSDM.ensure(
          !pit8.equals(pit10), "check isomorphic binding between objects pit8 and pit10");

      // check isomorphic binding between objects pit9 and pit10
      JavaSDM.ensure(
          !pit9.equals(pit10), "check isomorphic binding between objects pit9 and pit10");

      // check isomorphic binding between objects pit12 and pit11
      JavaSDM.ensure(
          !pit12.equals(pit11), "check isomorphic binding between objects pit12 and pit11");

      // check isomorphic binding between objects pit11 and pit1
      JavaSDM.ensure(
          !pit11.equals(pit1), "check isomorphic binding between objects pit11 and pit1");

      // check isomorphic binding between objects pit2 and pit11
      JavaSDM.ensure(
          !pit2.equals(pit11), "check isomorphic binding between objects pit2 and pit11");

      // check isomorphic binding between objects pit3 and pit11
      JavaSDM.ensure(
          !pit3.equals(pit11), "check isomorphic binding between objects pit3 and pit11");

      // check isomorphic binding between objects pit4 and pit11
      JavaSDM.ensure(
          !pit4.equals(pit11), "check isomorphic binding between objects pit4 and pit11");

      // check isomorphic binding between objects pit5 and pit11
      JavaSDM.ensure(
          !pit5.equals(pit11), "check isomorphic binding between objects pit5 and pit11");

      // check isomorphic binding between objects pit6 and pit11
      JavaSDM.ensure(
          !pit6.equals(pit11), "check isomorphic binding between objects pit6 and pit11");

      // check isomorphic binding between objects pit7 and pit11
      JavaSDM.ensure(
          !pit7.equals(pit11), "check isomorphic binding between objects pit7 and pit11");

      // check isomorphic binding between objects pit8 and pit11
      JavaSDM.ensure(
          !pit8.equals(pit11), "check isomorphic binding between objects pit8 and pit11");

      // check isomorphic binding between objects pit9 and pit11
      JavaSDM.ensure(
          !pit9.equals(pit11), "check isomorphic binding between objects pit9 and pit11");

      // check isomorphic binding between objects pit12 and pit1
      JavaSDM.ensure(
          !pit12.equals(pit1), "check isomorphic binding between objects pit12 and pit1");

      // check isomorphic binding between objects pit2 and pit12
      JavaSDM.ensure(
          !pit2.equals(pit12), "check isomorphic binding between objects pit2 and pit12");

      // check isomorphic binding between objects pit3 and pit12
      JavaSDM.ensure(
          !pit3.equals(pit12), "check isomorphic binding between objects pit3 and pit12");

      // check isomorphic binding between objects pit4 and pit12
      JavaSDM.ensure(
          !pit4.equals(pit12), "check isomorphic binding between objects pit4 and pit12");

      // check isomorphic binding between objects pit5 and pit12
      JavaSDM.ensure(
          !pit5.equals(pit12), "check isomorphic binding between objects pit5 and pit12");

      // check isomorphic binding between objects pit6 and pit12
      JavaSDM.ensure(
          !pit6.equals(pit12), "check isomorphic binding between objects pit6 and pit12");

      // check isomorphic binding between objects pit7 and pit12
      JavaSDM.ensure(
          !pit7.equals(pit12), "check isomorphic binding between objects pit7 and pit12");

      // check isomorphic binding between objects pit8 and pit12
      JavaSDM.ensure(
          !pit8.equals(pit12), "check isomorphic binding between objects pit8 and pit12");

      // check isomorphic binding between objects pit9 and pit12
      JavaSDM.ensure(
          !pit9.equals(pit12), "check isomorphic binding between objects pit9 and pit12");

      // check isomorphic binding between objects pit2 and pit1
      JavaSDM.ensure(!pit2.equals(pit1), "check isomorphic binding between objects pit2 and pit1");

      // check isomorphic binding between objects pit3 and pit1
      JavaSDM.ensure(!pit3.equals(pit1), "check isomorphic binding between objects pit3 and pit1");

      // check isomorphic binding between objects pit4 and pit1
      JavaSDM.ensure(!pit4.equals(pit1), "check isomorphic binding between objects pit4 and pit1");

      // check isomorphic binding between objects pit5 and pit1
      JavaSDM.ensure(!pit5.equals(pit1), "check isomorphic binding between objects pit5 and pit1");

      // check isomorphic binding between objects pit6 and pit1
      JavaSDM.ensure(!pit6.equals(pit1), "check isomorphic binding between objects pit6 and pit1");

      // check isomorphic binding between objects pit7 and pit1
      JavaSDM.ensure(!pit7.equals(pit1), "check isomorphic binding between objects pit7 and pit1");

      // check isomorphic binding between objects pit8 and pit1
      JavaSDM.ensure(!pit8.equals(pit1), "check isomorphic binding between objects pit8 and pit1");

      // check isomorphic binding between objects pit9 and pit1
      JavaSDM.ensure(!pit9.equals(pit1), "check isomorphic binding between objects pit9 and pit1");

      // check isomorphic binding between objects pit3 and pit2
      JavaSDM.ensure(!pit3.equals(pit2), "check isomorphic binding between objects pit3 and pit2");

      // check isomorphic binding between objects pit4 and pit2
      JavaSDM.ensure(!pit4.equals(pit2), "check isomorphic binding between objects pit4 and pit2");

      // check isomorphic binding between objects pit5 and pit2
      JavaSDM.ensure(!pit5.equals(pit2), "check isomorphic binding between objects pit5 and pit2");

      // check isomorphic binding between objects pit6 and pit2
      JavaSDM.ensure(!pit6.equals(pit2), "check isomorphic binding between objects pit6 and pit2");

      // check isomorphic binding between objects pit7 and pit2
      JavaSDM.ensure(!pit7.equals(pit2), "check isomorphic binding between objects pit7 and pit2");

      // check isomorphic binding between objects pit8 and pit2
      JavaSDM.ensure(!pit8.equals(pit2), "check isomorphic binding between objects pit8 and pit2");

      // check isomorphic binding between objects pit9 and pit2
      JavaSDM.ensure(!pit9.equals(pit2), "check isomorphic binding between objects pit9 and pit2");

      // check isomorphic binding between objects pit4 and pit3
      JavaSDM.ensure(!pit4.equals(pit3), "check isomorphic binding between objects pit4 and pit3");

      // check isomorphic binding between objects pit5 and pit3
      JavaSDM.ensure(!pit5.equals(pit3), "check isomorphic binding between objects pit5 and pit3");

      // check isomorphic binding between objects pit6 and pit3
      JavaSDM.ensure(!pit6.equals(pit3), "check isomorphic binding between objects pit6 and pit3");

      // check isomorphic binding between objects pit7 and pit3
      JavaSDM.ensure(!pit7.equals(pit3), "check isomorphic binding between objects pit7 and pit3");

      // check isomorphic binding between objects pit8 and pit3
      JavaSDM.ensure(!pit8.equals(pit3), "check isomorphic binding between objects pit8 and pit3");

      // check isomorphic binding between objects pit9 and pit3
      JavaSDM.ensure(!pit9.equals(pit3), "check isomorphic binding between objects pit9 and pit3");

      // check isomorphic binding between objects pit5 and pit4
      JavaSDM.ensure(!pit5.equals(pit4), "check isomorphic binding between objects pit5 and pit4");

      // check isomorphic binding between objects pit6 and pit4
      JavaSDM.ensure(!pit6.equals(pit4), "check isomorphic binding between objects pit6 and pit4");

      // check isomorphic binding between objects pit7 and pit4
      JavaSDM.ensure(!pit7.equals(pit4), "check isomorphic binding between objects pit7 and pit4");

      // check isomorphic binding between objects pit8 and pit4
      JavaSDM.ensure(!pit8.equals(pit4), "check isomorphic binding between objects pit8 and pit4");

      // check isomorphic binding between objects pit9 and pit4
      JavaSDM.ensure(!pit9.equals(pit4), "check isomorphic binding between objects pit9 and pit4");

      // check isomorphic binding between objects pit6 and pit5
      JavaSDM.ensure(!pit6.equals(pit5), "check isomorphic binding between objects pit6 and pit5");

      // check isomorphic binding between objects pit7 and pit5
      JavaSDM.ensure(!pit7.equals(pit5), "check isomorphic binding between objects pit7 and pit5");

      // check isomorphic binding between objects pit8 and pit5
      JavaSDM.ensure(!pit8.equals(pit5), "check isomorphic binding between objects pit8 and pit5");

      // check isomorphic binding between objects pit9 and pit5
      JavaSDM.ensure(!pit9.equals(pit5), "check isomorphic binding between objects pit9 and pit5");

      // check isomorphic binding between objects pit7 and pit6
      JavaSDM.ensure(!pit7.equals(pit6), "check isomorphic binding between objects pit7 and pit6");

      // check isomorphic binding between objects pit8 and pit6
      JavaSDM.ensure(!pit8.equals(pit6), "check isomorphic binding between objects pit8 and pit6");

      // check isomorphic binding between objects pit9 and pit6
      JavaSDM.ensure(!pit9.equals(pit6), "check isomorphic binding between objects pit9 and pit6");

      // check isomorphic binding between objects pit8 and pit7
      JavaSDM.ensure(!pit8.equals(pit7), "check isomorphic binding between objects pit8 and pit7");

      // check isomorphic binding between objects pit9 and pit7
      JavaSDM.ensure(!pit9.equals(pit7), "check isomorphic binding between objects pit9 and pit7");

      // check isomorphic binding between objects pit9 and pit8
      JavaSDM.ensure(!pit9.equals(pit8), "check isomorphic binding between objects pit9 and pit8");

      // check link has from turn to artjom
      JavaSDM.ensure(artjom.equals(turn.getPlayer()), "check link has from turn to artjom");

      // check link next of from artjomStore to pit1
      JavaSDM.ensure(
          pit1.equals(artjomStore.getNextPit()), "check link next of from artjomStore to pit1");

      // check link next of from pit10 to pit11
      JavaSDM.ensure(pit11.equals(pit10.getNextPit()), "check link next of from pit10 to pit11");

      // check link next of from pit11 to pit12
      JavaSDM.ensure(pit12.equals(pit11.getNextPit()), "check link next of from pit11 to pit12");

      // check link next of from pit12 to artjomStore
      JavaSDM.ensure(
          artjomStore.equals(pit12.getNextPit()), "check link next of from pit12 to artjomStore");

      // check link next of from pit1 to pit2
      JavaSDM.ensure(pit2.equals(pit1.getNextPit()), "check link next of from pit1 to pit2");

      // check link next of from pit2 to pit3
      JavaSDM.ensure(pit3.equals(pit2.getNextPit()), "check link next of from pit2 to pit3");

      // check link next of from pit3 to pit4
      JavaSDM.ensure(pit4.equals(pit3.getNextPit()), "check link next of from pit3 to pit4");

      // check link next of from pit4 to pit5
      JavaSDM.ensure(pit5.equals(pit4.getNextPit()), "check link next of from pit4 to pit5");

      // check link next of from pit5 to pit6
      JavaSDM.ensure(pit6.equals(pit5.getNextPit()), "check link next of from pit5 to pit6");

      // check link next of from pit6 to ulnoStore
      JavaSDM.ensure(
          ulnoStore.equals(pit6.getNextPit()), "check link next of from pit6 to ulnoStore");

      // check link next of from pit7 to pit8
      JavaSDM.ensure(pit8.equals(pit7.getNextPit()), "check link next of from pit7 to pit8");

      // check link next of from pit8 to pit9
      JavaSDM.ensure(pit9.equals(pit8.getNextPit()), "check link next of from pit8 to pit9");

      // check link next of from pit9 to pit10
      JavaSDM.ensure(pit10.equals(pit9.getNextPit()), "check link next of from pit9 to pit10");

      // check link next of from ulnoStore to pit7
      JavaSDM.ensure(
          pit7.equals(ulnoStore.getNextPit()), "check link next of from ulnoStore to pit7");

      // check link opposite of from pit12 to pit1
      JavaSDM.ensure(
          pit1.equals(pit12.getOppositePit()), "check link opposite of from pit12 to pit1");

      // check link opposite of from pit11 to pit2
      JavaSDM.ensure(
          pit2.equals(pit11.getOppositePit()), "check link opposite of from pit11 to pit2");

      // check link opposite of from pit10 to pit3
      JavaSDM.ensure(
          pit3.equals(pit10.getOppositePit()), "check link opposite of from pit10 to pit3");

      // check link opposite of from pit9 to pit4
      JavaSDM.ensure(
          pit4.equals(pit9.getOppositePit()), "check link opposite of from pit9 to pit4");

      // check link opposite of from pit8 to pit5
      JavaSDM.ensure(
          pit5.equals(pit8.getOppositePit()), "check link opposite of from pit8 to pit5");

      // check link opposite of from pit7 to pit6
      JavaSDM.ensure(
          pit6.equals(pit7.getOppositePit()), "check link opposite of from pit7 to pit6");

      // check link owns from artjomStore to artjom
      JavaSDM.ensure(
          artjom.equals(artjomStore.getPlayer()), "check link owns from artjomStore to artjom");

      // check link owns from pit10 to artjom
      JavaSDM.ensure(artjom.equals(pit10.getPlayer()), "check link owns from pit10 to artjom");

      // check link owns from pit11 to artjom
      JavaSDM.ensure(artjom.equals(pit11.getPlayer()), "check link owns from pit11 to artjom");

      // check link owns from pit12 to artjom
      JavaSDM.ensure(artjom.equals(pit12.getPlayer()), "check link owns from pit12 to artjom");

      // check link owns from pit7 to artjom
      JavaSDM.ensure(artjom.equals(pit7.getPlayer()), "check link owns from pit7 to artjom");

      // check link owns from pit8 to artjom
      JavaSDM.ensure(artjom.equals(pit8.getPlayer()), "check link owns from pit8 to artjom");

      // check link owns from pit9 to artjom
      JavaSDM.ensure(artjom.equals(pit9.getPlayer()), "check link owns from pit9 to artjom");

      // check link owns from pit1 to ulno
      JavaSDM.ensure(ulno.equals(pit1.getPlayer()), "check link owns from pit1 to ulno");

      // check link owns from pit2 to ulno
      JavaSDM.ensure(ulno.equals(pit2.getPlayer()), "check link owns from pit2 to ulno");

      // check link owns from pit3 to ulno
      JavaSDM.ensure(ulno.equals(pit3.getPlayer()), "check link owns from pit3 to ulno");

      // check link owns from pit5 to ulno
      JavaSDM.ensure(ulno.equals(pit5.getPlayer()), "check link owns from pit5 to ulno");

      // check link owns from pit6 to ulno
      JavaSDM.ensure(ulno.equals(pit6.getPlayer()), "check link owns from pit6 to ulno");

      // check link owns from ulnoStore to ulno
      JavaSDM.ensure(ulno.equals(ulnoStore.getPlayer()), "check link owns from ulnoStore to ulno");

      // attribute condition gameOver == false
      JavaSDM.ensure(visitor.isGameOver() == false, "attribute condition gameOver == false");

      // attribute condition name == "Artjom"
      JavaSDM.ensure(
          JavaSDM.stringCompare((String) artjom.getName(), "Artjom") == 0,
          "attribute condition name == \"Artjom\"");

      // attribute condition name == "Ulno"
      JavaSDM.ensure(
          JavaSDM.stringCompare((String) ulno.getName(), "Ulno") == 0,
          "attribute condition name == \"Ulno\"");

      // attribute condition seeds == 0
      JavaSDM.ensure(pit1.getSeeds() == 0, "attribute condition seeds == 0");

      // attribute condition seeds == 0
      JavaSDM.ensure(pit3.getSeeds() == 0, "attribute condition seeds == 0");

      // attribute condition seeds == 0
      JavaSDM.ensure(pit4.getSeeds() == 0, "attribute condition seeds == 0");

      // attribute condition seeds == 0
      JavaSDM.ensure(pit7.getSeeds() == 0, "attribute condition seeds == 0");

      // attribute condition seeds == 0
      JavaSDM.ensure(pit10.getSeeds() == 0, "attribute condition seeds == 0");

      // attribute condition seeds == 1
      JavaSDM.ensure(pit9.getSeeds() == 1, "attribute condition seeds == 1");

      // attribute condition seeds == 4
      JavaSDM.ensure(pit2.getSeeds() == 4, "attribute condition seeds == 4");

      // attribute condition seeds == 4
      JavaSDM.ensure(pit5.getSeeds() == 4, "attribute condition seeds == 4");

      // attribute condition seeds == 4
      JavaSDM.ensure(pit6.getSeeds() == 4, "attribute condition seeds == 4");

      // attribute condition seeds == 4
      JavaSDM.ensure(pit8.getSeeds() == 4, "attribute condition seeds == 4");

      // attribute condition seeds == 4
      JavaSDM.ensure(pit11.getSeeds() == 4, "attribute condition seeds == 4");

      // attribute condition seeds == 4
      JavaSDM.ensure(pit12.getSeeds() == 4, "attribute condition seeds == 4");

      // attribute condition seeds == 5
      JavaSDM.ensure(ulnoStore.getSeeds() == 5, "attribute condition seeds == 5");

      // attribute condition seeds == 6
      JavaSDM.ensure(artjomStore.getSeeds() == 6, "attribute condition seeds == 6");

      fujaba__Success = true;
    } catch (JavaSDMException fujaba__InternalException) {
      fujaba__Success = false;
      StringWriter fujaba_StringWriter = new StringWriter();
      PrintWriter fujaba_PrintWriter = new PrintWriter(fujaba_StringWriter);
      fujaba__InternalException.printStackTrace(fujaba_PrintWriter);
      int length = fujaba__InternalException.getClass().getName().length() + 2;
      AssertionFailedError fujaba_AssertionFailedError =
          new AssertionFailedError(fujaba_StringWriter.toString().substring(length));
      fujaba_AssertionFailedError.setStackTrace(new StackTraceElement[] {});
      throw fujaba_AssertionFailedError;
    }
  }
示例#2
0
文件: playJack.java 项目: annael/sm
  public void playCard() {
    boolean fujaba__Success = false;
    Player player2 = null;
    Iterator fujaba__IterPlayer2ToCard2 = null;
    Card card2 = null;

    // story pattern successor
    try {
      fujaba__Success = false;

      // check object card1 is really bound
      JavaSDM.ensure(card1 != null);
      // check object cardsInPlay is really bound
      JavaSDM.ensure(cardsInPlay != null);
      // check object player1 is really bound
      JavaSDM.ensure(player1 != null);
      // check object turn is really bound
      JavaSDM.ensure(turn != null);
      // check link contain from card1 to cardsInPlay
      JavaSDM.ensure(cardsInPlay.equals(card1.getCardsInPlay()));

      // check link has from turn to player1
      JavaSDM.ensure(player1.equals(turn.getPlayer()));

      // search to-one link before from player1 to player2
      player2 = player1.getNext();

      // check object player2 is really bound
      JavaSDM.ensure(player2 != null);

      // check isomorphic binding between objects player2 and player1
      JavaSDM.ensure(!player2.equals(player1));

      // check link has from card1 to player1
      JavaSDM.ensure(card1.hasInPlayer(player1));

      // attribute condition suit == J
      JavaSDM.ensure(JavaSDM.stringCompare((String) card1.getSuit(), J) == 0);

      // attribute condition suit == card.getSuit()
      JavaSDM.ensure(JavaSDM.stringCompare((String) turn.getSuit(), card.getSuit()) == 0);

      // destroy link has from card1 to player1
      card1.removeFromPlayer(player1);
      fujaba__Success = true;
    } catch (JavaSDMException fujaba__InternalException) {
      fujaba__Success = false;
    }

    // story pattern Successor of successor
    try {
      fujaba__Success = false;

      // check object card1 is really bound
      JavaSDM.ensure(card1 != null);
      // check object cardsInPlay is really bound
      JavaSDM.ensure(cardsInPlay != null);
      // check object player1 is really bound
      JavaSDM.ensure(player1 != null);
      // check object player2 is really bound
      JavaSDM.ensure(player2 != null);
      // check object turn is really bound
      JavaSDM.ensure(turn != null);
      // check isomorphic binding between objects player2 and player1
      JavaSDM.ensure(!player2.equals(player1));

      // check link before from player2 to player1
      JavaSDM.ensure(player1.equals(player2.getFirst()));

      // check link contain from card1 to cardsInPlay
      JavaSDM.ensure(cardsInPlay.equals(card1.getCardsInPlay()));

      // check link has from turn to player1
      JavaSDM.ensure(player1.equals(turn.getPlayer()));

      // iterate to-many link has from player2 to card2
      fujaba__Success = false;
      fujaba__IterPlayer2ToCard2 = player2.iteratorOfCard();

      while (!(fujaba__Success) && fujaba__IterPlayer2ToCard2.hasNext()) {
        try {
          card2 = (Card) fujaba__IterPlayer2ToCard2.next();

          // check object card2 is really bound
          JavaSDM.ensure(card2 != null);
          // check isomorphic binding between objects card2 and card1
          JavaSDM.ensure(!card2.equals(card1));

          fujaba__Success = true;
        } catch (JavaSDMException fujaba__InternalException) {
          fujaba__Success = false;
        }
      }
      JavaSDM.ensure(fujaba__Success);
      // attribute condition suit != card.getSuit()
      JavaSDM.ensure(JavaSDM.stringCompare((String) turn.getSuit(), card.getSuit()) != 0);

      // attribute condition suit == J
      JavaSDM.ensure(JavaSDM.stringCompare((String) card1.getSuit(), J) == 0);

      // destroy link has from turn to player1
      turn.setPlayer(null);
      // create link has from turn to player2
      turn.setPlayer(player2);

      // create link contain from card2 to cardsInPlay
      card2.setCardsInPlay(cardsInPlay);

      fujaba__Success = true;
    } catch (JavaSDMException fujaba__InternalException) {
      fujaba__Success = false;
    }

    return;
  }