mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Game state now updates based on boat position. Arrows drawn as boat travels course. Currently do not point in correct direction, also the sparkline does not work.
#bug #refactor #implement #story[1118]
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package seng302.gameServer.messages;
|
||||
|
||||
public class Heartbeat extends Message {
|
||||
private final int MESSAGE_SIZE = 4;
|
||||
|
||||
/**
|
||||
* Heartbeat from the AC35 Streaming data spec
|
||||
* @param seqNo Increment every time a message is sent
|
||||
*/
|
||||
public Heartbeat(int seqNo){
|
||||
setHeader(new Header(MessageType.HEARTBEAT, 0x01, (short) getSize()));
|
||||
|
||||
allocateBuffer();
|
||||
writeHeaderToBuffer();
|
||||
|
||||
putUnsignedInt(seqNo, 4);
|
||||
|
||||
writeCRC();
|
||||
rewind();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return MESSAGE_SIZE;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user