예제 #1
0
 @AfterInject
 void initBots() {
   if (blackPlayer.getAi()) {
     bots[0] = new OffensiveAI(game, blackPlayer, true);
   }
   if (whitePlayer.getAi()) {
     bots[1] = new OffensiveAI(game, whitePlayer, true);
   }
 }
예제 #2
0
  @AfterViews
  void initViews() {
    this.barsView[Game.State.OnGoing.ordinal()] = (LinearLayout) findViewById(R.id.ongoing_bar);
    this.barsView[Game.State.Territories.ordinal()] =
        (LinearLayout) findViewById(R.id.territory_bar);
    this.barsView[Game.State.Over.ordinal()] = (LinearLayout) findViewById(R.id.over_bar);
    this.barsView[Game.State.Review.ordinal()] = (LinearLayout) findViewById(R.id.review_bar);

    int gobanSize = getScreenSize();

    gobanLayout.getLayoutParams().height = gobanSize;
    gobanLayout.getLayoutParams().width = gobanSize;

    grid = BoardView_.build(this);
    grid.init(game, gobanSize);
    gobanLayout.addView(grid);

    toolBar.setTitle(blackPlayer.getName() + " vs " + whitePlayer.getName());

    onNextTurn();
  }