Added LatestMessages to network.Messages. This is an object that encapsulates the latest up to date set of race messages.
Race stores a reference to it. MockRace writes to it, and eventually, VisualiserRace will read from it. Updated MockRace, MockOutput, Event to use it. Angle now implements hashCode().
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package visualiser.app;
|
||||
import javafx.application.Platform;
|
||||
import network.Messages.*;
|
||||
import org.xml.sax.SAXException;
|
||||
import seng302.Networking.BinaryMessageDecoder;
|
||||
import seng302.Networking.Exceptions.InvalidMessageException;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import java.io.DataInputStream;
|
||||
@@ -13,12 +12,9 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static seng302.Networking.Utils.ByteConverter.bytesToShort;
|
||||
|
||||
/**
|
||||
* TCP client which receives packets/messages from a race data source
|
||||
* (e.g., mock source, official source), and exposes them to any observers.
|
||||
* @see seng302.Mock.StreamedCourse
|
||||
*/
|
||||
public class VisualiserInput implements Runnable {
|
||||
|
||||
@@ -30,8 +26,6 @@ public class VisualiserInput implements Runnable {
|
||||
///The socket that we have connected to.
|
||||
private Socket connectionSocket;
|
||||
|
||||
///Object to store parsed course data. //TODO comment?
|
||||
private StreamedCourse course;
|
||||
|
||||
///The last RaceStatus message received.
|
||||
private RaceStatus raceStatus;
|
||||
|
||||
Reference in New Issue
Block a user