package br.net.venson;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Playlist playlist = new Playlist();
        playlist.addSong("Song 1 (Ending Credits)", "audio/song1.wav");
        playlist.addSong("Song 2 (Level 1)", "audio/song2.wav");
        playlist.addSong("Song 3 (Level 2)", "audio/song3.wav");
        playlist.addSong("Song 4 (Level 3)", "audio/song4.wav");
        playlist.addSong("Song 5 (Title Screen)", "audio/song5.wav");

        PlaylistIterator iterator = playlist.createShuffleIterator();
        Player player = new Player(iterator);

        Scanner sc = new Scanner(System.in);
        System.out.println("Comandos: play, next, previous, stop, exit");

        while (true) {
            String cmd = sc.nextLine();

            switch (cmd) {
                case "play": player.play(); break;
                case "next": player.next(); break;
                case "previous": player.previous(); break;
                case "stop": player.stop(); break;
                case "exit": player.stop(); return;
            }
        }
    }
}
