Large diffs are not rendered by default.

@@ -12,6 +12,9 @@
import org.academiadecodigo.simplegraphics.mouse.MouseHandler;
import org.academiadecodigo.simplegraphics.pictures.Picture;

import javax.sound.sampled.*;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.ListIterator;

@@ -38,6 +41,7 @@ public Game () {
// TODO: 25/05/16 init or constructor?
// TODO: 29/05/2016 player selection
registerKeyboardInput();
playSound();
menu = new Menu();
}

@@ -260,6 +264,31 @@ private void registerKeyboardInput() {
event9.setKeyboardEventType(KeyboardEventType.KEY_PRESSED);
k.addEventListener(event9);*/
}

private void playSound() {
AudioInputStream in;

File soundFile = new File("music.wav");

try {
in = AudioSystem.getAudioInputStream(soundFile);
AudioSystem.getAudioFileFormat(soundFile);
Clip clip;
clip = AudioSystem.getClip();
clip.open(in);
clip.start();

} catch (UnsupportedAudioFileException e) {
e.printStackTrace();

} catch (LineUnavailableException e) {
e.printStackTrace();


} catch (IOException e) {
e.printStackTrace();
}
}
}


@@ -2,12 +2,14 @@

import org.academiadecodigo.codewar.gameobjects.MasterCoder;

import java.io.FileNotFoundException;

/**
* Created by diogocodecadet on 23/05/16.
*/
public class Main {
// TODO: 24/05/16 change name to beijinhos & caralhinhos
public static void main(String[] args) throws InterruptedException {
public static void main(String[] args) throws InterruptedException, FileNotFoundException {

Game g = new Game();