コード例 #1
0
  /** Constructor */
  public SimpleBrainTheMatrixApp() {

    simpleBrain = new SimpleBrain();
    // switching game logic between human and AI versions is too complicated to manage without the
    // AIAppState and HumanAppState delegates.
    theMatrix = new TheMatrix(GameView.GOD_VIEW, new AIAppState());

    theMatrix.setShowSettings(false);
    AppSettings settings = new AppSettings(true);
    settings.setResolution(1300, 700);
    settings.setTitle("The Matrix");
    theMatrix.setSettings(settings);
    theMatrix.addChangeListener(this);
    theMatrix.start();
  }
コード例 #2
0
  @Override
  public void propertyChange(PropertyChangeEvent pce) {

    theMatrix.addAICommands(simpleBrain.update(pce));
  }