Examples of Board


Examples of org.boblycat.abbots.Board

   
    public Board start() throws IOException {
        List<String> resp = sendAndReceive("start");
        if (resp.size() != 1)
            throw new ProtocolException("Error getting board: " + resp);
        Board board = new Board();
        board.parse(resp.get(0));
        return board;
    }

Examples of org.jpacman.framework.model.Board

   * @throws FactoryException If parsing fails. Should not happen.
   */
  @Test
  public void testFullMap() throws FactoryException {
    Game g = parser.parseMap(map);
    Board b = g.getBoard();

    // did we recognize the right sprites?
    assertEquals(SpriteType.EMPTY, b.spriteTypeAt(1, 3));
    assertEquals(SpriteType.PLAYER, b.spriteTypeAt(2, 2));
    assertEquals(SpriteType.GHOST, b.spriteTypeAt(1, 2));
    assertEquals(SpriteType.WALL, b.spriteTypeAt(0, 0));
    assertEquals(SpriteType.FOOD, b.spriteTypeAt(1, 1));

    // did we properly set the player?
    assertEquals(g.getPlayer(), b.spriteAt(2, 2));

    // were all ghosts added?
    assertEquals(2, g.getGhosts().size());

    // was the food actually added?

Examples of org.knapper.tubes.core.internal.Board

  private Board board;
 
  private PlayerHand playerHand;
 
  public TubesGame() {
    board = new Board();
    playerHand = new PlayerHand(board.getCardSet(), 5);
  }

Examples of org.openpnp.model.Board

                putValue(SHORT_DESCRIPTION, "Import");
            }
            public void actionPerformed(ActionEvent e) {
                topFile = new File(textFieldTopFile.getText());
                bottomFile = new File(textFieldBottomFile.getText());
                board = new Board();
                List<Placement> placements = new ArrayList<Placement>();
                try {
                    placements.addAll(parseFile(topFile, Side.Top, chckbxCreateMissingParts.isSelected()));
                    placements.addAll(parseFile(bottomFile, Side.Bottom, chckbxCreateMissingParts.isSelected()));
                }

Examples of org.qi4j.samples.forum.data.entity.Board

            return module.newQueryBuilder( Board.class ).newQuery( self.boards() );
        }

        public Board createBoard( String name )
        {
            Board board = module.currentUnitOfWork().newEntity( Board.class );
            board.name().set( name );
            administrator.makeModerator( board );
            return board;
        }

Examples of org.trello4j.model.Board

  public void shouldCreateBoard() throws Exception {
    // GIVEN
    InputStream json = getTestDataFromFile("board.json");
   
    // WHEN
    Board board = trelloObjFactory.createObject(new TypeToken<Board>(){}, json);
   
    // THEN
    assertEquals("4da855081418d090420f12d7", board.getId());
   
    json.close();
  }

Examples of pdp.scrabble.game.Board

    public void tearDown() {
    }

    @Test
    public void boardAccessTester() {
  Board board = GAME.board();

  try {
      board.getCase(0, 0);
      System.out.println("Can get 0, 0");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }

  try {
      board.getCase(-1, -1);
      System.out.println("Can get -1, -1; but not recommended (safe border only)");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }

  try {
      board.getCase(-2, -2);
      fail("ArrayIndexOutOfBoundsException was expected");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't get -2, -2");
  }

  System.out.println("Clear board and validate it");
  board.clear();
  try {
      board.validate(true);
      System.out.println("Board check ignored, because no new letter added");
  }
  catch (BoardWrongWordPlace ex) {
      fail("BoardWrongWordPlace was not expected");
  }

  System.out.println("Add new letter at 0, 0");
  board.setCaseLetter(0, 0, FACTORY.createLetter('A', 1, 0), true);
  try {
      board.validate(true);
      fail("BoardWrongWordPlace was expected");
  }
  catch (BoardWrongWordPlace ex) {
      System.out.println("BoardWrongWordPlace error, because center is not used");
  }

  try {
      board.cancel(null);
  }
  catch (NullPointerException ex) {
      fail("NullPointerException was not expected");
  }

  try {
      board.switchCasesLetter(-1, -1, 0, 0);
      System.out.println("Can switch -1, -1 and 0, 0, but not recommended (used as safe area)");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }

  try {
      board.switchCasesLetter(-2, -2, 0, 0);
      fail("ArrayIndexOutOfBoundsException was expected");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch -2, -2 and 0, 0");
  }

Examples of pl.michalostruszka.gameoflife.board.Board

    public GameOfLife(Board initialState) {
        currentState = initialState;
    }

    public GameOfLife() {
        currentState = new Board();
    }

Examples of plugins.Freetalk.Board

    super.setUp();

    mMessageManager = mFreetalk.getMessageManager();
    mXML = new WoTMessageXML();
   
    Board myBoard = mMessageManager.getOrCreateBoard("eng.board1");
    HashSet<Board> myBoards = new HashSet<Board>();
    myBoards.add(myBoard);
    myBoards.add(mMessageManager.getOrCreateBoard("eng.board2"));
   
    FreenetURI authorRequestSSK = new FreenetURI("SSK@nU16TNCS7~isPTa9gw6nF8c3lQpJGFHA2KwTToMJuNk,FjCiOUGSl6ipOE9glNai9WCp1vPM8k181Gjw62HhYSo,AQACAAE/");

Examples of vrampal.connectfour.core.Board

    // Nothing to do.
  }

  @Override
  public int selectPlayColumn(Game game) {
    Board board = game.getBoard();
    int width = board.getWidth();
    List<Integer> bestMatchs = new ArrayList<>();
    double bestStat = -1000.0;

    for (int colIdx = 0; colIdx < width; colIdx++) {
      if (!board.isColumnFull(colIdx)) {
        GamesData candidate = currentData.getSubGame(colIdx);
        if (candidate != null) {
          double stat = getStat(candidate);
          if (stat > bestStat) {
            bestStat = stat;
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.