Examples of Board


Examples of ee.ttu.cs.iti0011.iabb104231.k1.Board.Board

    MockupPlayer u1 = new MockupPlayer();
    MockupPlayer u2 = new MockupPlayer();
    u1.setName("mockup 1");
    u2.setName("mockup 2");

    Board b = new Board();
    b.addPlayer(u1);
    b.addPlayer(u2);
   
    try{
      b.makeMove(u1, 1);
      b.makeMove(u1, 1);
    } catch(PlayerCantMoveTwice e){
      throw e;
    } catch(Exception j){
      throw j;
    }

Examples of engine.Board

   * @param pbb - probability of moving a block
   * @param originalScheme - the scheme, which contains the board
   * @return scheme with the new board and the moves
   */
  public static Scheme generateEquivalent(double pbb, Scheme originalScheme) {
    Scheme s = new Scheme(new Board(originalScheme.start));
   
    int width = s.start.width, height = s.start.height;
    int[] rows = MixGenerator.randomPermutation(height);
    for (int y : rows) {
      int[] columns = MixGenerator.randomPermutation(width);

Examples of frost.messaging.frost.boards.Board

        if (chosenBoards == null || chosenBoards.size() == 0) { // nothing chosed or cancelled
            return;
        }

        for (int i = 0; i < chosenBoards.size(); i++) {
            final Board chosedBoard = chosenBoards.get(i);

            String privKey = chosedBoard.getPrivateKey();

            if (privKey != null) {
                final int answer =
                    JOptionPane.showConfirmDialog(this,
                        language.formatMessage("MessageFrame.attachBoard.sendPrivateKeyConfirmationDialog.body", chosedBoard.getName()),
                        language.getString("MessageFrame.attachBoard.sendPrivateKeyConfirmationDialog.title"),
                        JOptionPane.YES_NO_OPTION);
                if (answer == JOptionPane.NO_OPTION) {
                    privKey = null; // don't provide privkey
                }
            }
            // build a new board because maybe privKey shouldn't be uploaded
            final Board aNewBoard =
                new Board(chosedBoard.getName(), chosedBoard.getPublicKey(), privKey, chosedBoard.getDescription());
            final MFAttachedBoard ab = new MFAttachedBoard(aNewBoard);
            boardsTableModel.addRow(ab);
        }
        positionDividers();
    }

Examples of frost.messaging.frost.boards.Board

            newMessage.setHasFileAttachments(true);
        }
        if( boardsTableModel.getRowCount() > 0 ) {
            for(int x=0; x < boardsTableModel.getRowCount(); x++) {
                final MFAttachedBoard ab = (MFAttachedBoard)boardsTableModel.getRow(x);
                final Board aChosedBoard = ab.getBoardObject();
                final BoardAttachment ba = new BoardAttachment(aChosedBoard);
                newMessage.addAttachment(ba);
            }
            newMessage.setHasBoardAttachments(true);
        }

Examples of frost.messaging.frost.boards.Board

                return;
            }
        }
        final AttachmentList<BoardAttachment> boardAttachmentList = selectedMessage.getAttachmentsOfTypeBoard();
        for( final int element : selectedRows ) {
            final Board fbo = boardAttachmentList.get(element).getBoardObj();
            final String boardName = fbo.getName();

            // search board in exising boards list
            final Board board = mainFrame.getFrostMessageTab().getTofTreeModel().getBoardByName(boardName);

            //ask if we already have the board
            if (board != null) {
                if (JOptionPane.showConfirmDialog(
                        this,
                        "You already have a board named " + boardName + ".\n" +
                            "Are you sure you want to add this one over it?",
                        "Board already exists",
                        JOptionPane.YES_NO_OPTION) != 0)
                {
                    continue; // next row of table / next attached board
                } else {
                    // change existing board keys to keys of new board
                    board.setPublicKey(fbo.getPublicKey());
                    board.setPrivateKey(fbo.getPrivateKey());
                    mainFrame.updateTofTree(board);
                }
            } else {
                // its a new board
                if(targetFolder == null) {

Examples of frost.messaging.frost.boards.Board

   
    if (hasBoardAttachments()) {
      result.append("\n\nAttached boards:");
     
      for(BoardAttachment boardAttachment : getAttachmentsOfTypeBoard()) {
        final Board board = boardAttachment.getBoardObj();
        result.append("\nName: ").append(board.getName()).append('\n');
        if( board.getPublicKey() != null ) {
          result.append("PubKey: ").append(board.getPublicKey()).append('\n');
          if( board.getPrivateKey() != null ) {
            result.append("PrivKey: ").append(board.getPrivateKey()).append('\n');
          }
        }
      }
    }

Examples of frost.messaging.frost.boards.Board

        final FrostDownloadItem item = modelTable.getSelectedItems().get(0);
        final String boardName = item.getAssociatedBoardName();
        final String messageId = item.getAssociatedMessageId();

        if (boardName != null && messageId != null) {
          final Board board = MainFrame.getInstance().getFrostMessageTab().getTofTreeModel().getBoardByName(
              boardName);
          final TofTree t = MainFrame.getInstance().getFrostMessageTab().getTofTree();

          if (board != null && t != null) {
            t.clearSelection();
            MainFrame.getInstance().getFrostMessageTab().forceSelectMessageId(messageId);
            t.setSelectionPath(new TreePath(board.getPath()));
            MainFrame.getInstance().selectTabbedPaneTab("MainFrame.tabbedPane.news");
          }
        }
      }
    }

Examples of general.Board

  /**
   * Initialises game.
   */
  private void initGame() {
    board = new Board();
    move = new Move(board);
    game = new Game();
    createPlayers();
  }

Examples of hexenschach.board.Board

        Player player3;
        // Das Gameplay das später zurück gegeben wird
        Gameplay gameplay;

        // Brett wird erzeugt
        board = new Board();

      pref = Preferences.userNodeForPackage(getClass());
        // Der Eintrag wird zwischengespeichert. Wird keiner gefunden wird "nix gefunden" zurück gegeben
        String loadedGameString = pref.get(gameName, "nix gefunden");
        //System.out.println(loadedGameString);

Examples of hexenschach.board.Board

       
        // Default: first currentPlayer = player1
        currentPlayer = 1;
       
        // Am Anfang eines Spieles wird ein neues Board erzeugt
        board = new Board();
       
        // setzen des ersten GameContextes
        currentContext = new GameContext (board, player1, player2, player3, currentPlayer);

        // Neue UndoRedo Liste wird erzeugt
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.