aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/constants/constants.scala
blob: 7d4e1a63e477517e318cf95d7a31338b8289d7bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

package scalevalapokalypsi.constants

val MAX_MSG_SIZE = 1024 // bytes
val CRLF: Vector[Byte] = Vector(13.toByte, 10.toByte)
val POLL_INTERVAL = 100 // millisec.
val GAME_VERSION = "0.1.0"
val TURN_INDICATOR = ">"
val SING_INDICATOR = "~"
val ACTION_BLOCKING_INDICATOR='.'
val ACTION_NONBLOCKING_INDICATOR='+'
val INITIAL_CONN_TIMEOUT = 5000 // millisec.

val LIST_SEPARATOR=";"

val PROTOCOL_VERSION_GOOD = "1"
val PROTOCOL_VERSION_BAD = "0"
// assert(PROTOCOL_VERSION_BAD.length <= PROTOCOL_VERSION_GOOD.length)

enum ServerProtocolState:
	case WaitingForVersion, WaitingForClientName, WaitingForGameStart, InGame