Game #23

Merged
schrom01 merged 43 commits from Game into main 2022-03-20 16:56:34 +01:00
1 changed files with 3 additions and 5 deletions
Showing only changes of commit 504d5c62ef - Show all commits

View File

@ -3,8 +3,7 @@ package ch.zhaw.pm2.racetrack;
import ch.zhaw.pm2.racetrack.given.ConfigSpecification;
import ch.zhaw.pm2.racetrack.given.TrackSpecification;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
@ -85,10 +84,9 @@ public class Track implements TrackSpecification {
* @throws FileNotFoundException if the FilePath is invalid.
*/
private void readFile(File trackFile) throws FileNotFoundException {
Scanner scanner = new Scanner(trackFile);
Scanner scanner = new Scanner(new FileInputStream(trackFile),"UTF-8");
while (scanner.hasNextLine()) {
//track.add(scanner.nextLine());
System.out.println(scanner.nextLine());
track.add(scanner.nextLine());
}
}