示例#1
0
  /**
   * Get tracks of this album. This automatically merges tracks from this albums discs.
   *
   * @return A {@link List} of {@link Track} objects.
   */
  public List<Link> getTracks() {
    List<Link> tracks = new ArrayList<Link>();

    for (Disc disc : this.discs) {
      tracks.addAll(disc.getTracks());
    }

    return tracks;
  }
示例#2
0
  public void addTrack(int disc, Link track) {
    if (discs == null) {
      discs = new ArrayList<Disc>();
    }
    for (Disc aDisc : discs) {
      if (aDisc.getNumber() == disc) {
        aDisc.addTrack(track);
        return;
      }
    }

    // Ok, didnt find a disk in there matchin the disc passed in
    Disc newDisc = new Disc(disc, null);
    newDisc.addTrack(track);
    discs.add(newDisc);
  }
示例#3
0
文件: C4_KI.java 项目: hslu-glider/c4
 /*
  * return
  */
 public int KI_makeNextMove(int row_user) {
   int row;
   gameField = Disc.placeUserDisc(row_user, gameField);
   /*
   if(Eval.eval(gameField) < -500){
       return 10;
   }
   * */
   abc.updateGameField(gameField);
   row = abc.getNextRow();
   /*
   if (row != -1){
       gameField = Disc.placeKIDisc(row, gameField);
       if(Eval.eval(gameField) > 500){
           return 20;
   }
   *
   }*/
   /*-----------------------------*/
   // Plot.plot_GameField(gameField);   // for Tests
   /*-----------------------------*/
   return row;
 }