1 2 3 4 5 6 7 8 9 10 11 12 13
package o1game.constants val MAX_MSG_SIZE = 1024 // bytes val LF: Byte = 10 val POLL_INTERVAL = 100 // millisec. val GAME_VERSION = "0.1.0" val PROTOCOL_VERSION_GOOD = "version ok" val PROTOCOL_VERSION_BAD = "version bad" enum ServerProtocolState: case WaitingForVersion, WaitingForClientName, WaitingForGameStart, InGame