/** * 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; }
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); }
/* * 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; }