Package net.shadewind.racetrack

Examples of net.shadewind.racetrack.Score


    try {
      List<String> lines = Files.readAllLines(path,
          StandardCharsets.UTF_8);
      scores.clear();
      for (String line : lines) {
        Score score = Score.parse(line);
        if (score != null)
          scores.add(score);
      }
    } catch (NoSuchFileException e) {
      logger.info("High score file doesn't exist, starting from scratch.");
View Full Code Here


   
    List<Score> scores = new ArrayList<Score>();
    for (Client client : clients) {
      Car car = cars.get(client);
      if (car.isFinished()) {
        scores.add(new Score(
            client.getName(),
            car.getPath().size() - 1,
            map.getName(),
            collisionsEnabled));
      }
View Full Code Here

 
  private void processEndGame(Command command) throws CommException
  {
    List<Score> highScores = new ArrayList<Score>();
    for (int i = 0; i < command.argCount(); i++) {
      Score score = Score.parse(command.argument(i));
      if (score != null)
        highScores.add(score);
    }
   
    listener.endGame(highScores);
View Full Code Here

TOP

Related Classes of net.shadewind.racetrack.Score

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.