Package fileInteraction

Examples of fileInteraction.BoardGameReader


        Chat.getSingleton().getChatTabbedModel().addChatter(GameHubModel.GAMEHUB_NAME + ": Team " + getCurrentUser().getTeamId(), player);
      }
    }


    BoardGameReader boardGameReader = new BoardGameReader();
    File game = boardGameReader.getBoardGame(gameFileName);

    gameLoader = new GameLoader(this);
    gameLoader.loadBoardGame(game);
    try {
      gameLoader.startGame();
View Full Code Here


        fireStateChanged();

      } else if (networkInput.startsWith(GAME_REQUEST_TOKEN)) {

        if (isHosting) { // Host heeft het spel zeker
          File game = new BoardGameReader().getBoardGame(gameFileName);
          NetworkAdapter.getSingleton().sendSerializableObject(game, fromIp, fromName);
        }
      }
    }
  }
View Full Code Here

    }
  }

  public void chooseGame() {

    BoardGameReader boardGameReader = new BoardGameReader();
    String[] games = boardGameReader.getBoardGames();

    if (games != null) {
      JList dataList = new JList(games);

      pickGameFrame = new JFrame("Choose the game!");
View Full Code Here

  public void pickGame(String name) {
    pickGameFrame.dispose();

    gameFileName = name.substring(0, name.lastIndexOf('.'));

    BoardGameReader boardGameReader = new BoardGameReader();
    File game = boardGameReader.getBoardGame(gameFileName);

    GameLoader gameLoader = new GameLoader(null);
    gameLoader.loadBoardGame(game);

    gameName = gameLoader.getGameName();
View Full Code Here

    return availableFriends;
  }

  private void requestGame() {

    if (new BoardGameReader().getBoardGame(gameFileName) == null) {

      for (Player player : playerList) {
        if (player.getStatus() == FriendStatus.IS_HOSTING) {
          NetworkAdapter.getSingleton().sendMessage(GAME_REQUEST_TOKEN + " " + gameFileName, player.getIp().getHostAddress(), player.getName());
        }
View Full Code Here

    getWindow().setContentPane(gameHubPanel);
    getWindow().pack();
  }

  public void installGame() {
    BoardGameReader boardGameReader = new BoardGameReader();
    File file = boardGameReader.getBoardGame();

    if (file != null) {
      BoardGameWriter boardGameWriter = new BoardGameWriter();
      boardGameWriter.saveBoardGame(file);
View Full Code Here

TOP

Related Classes of fileInteraction.BoardGameReader

Copyright © 2018 www.massapicom. 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.