Code Style Improvements (#1016)

* code style improvements for SessionData file

* refactored and simplified methods; added GenericAction case enum for smoother GenericActionMessage behavior; fixed timers for MAX unit

* 10 -> 11; suffixes for actions that are 'received' from the client
This commit is contained in:
Fate-JH 2023-02-10 23:40:16 -05:00 committed by GitHub
parent 335c4b2099
commit 40cf783f18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1792 additions and 1980 deletions

View file

@ -12,14 +12,14 @@ class GenericActionMessageTest extends Specification {
"decode" in {
PacketCoding.decodePacket(string).require match {
case GenericActionMessage(action) =>
action mustEqual 37
action mustEqual GenericAction.NotLookingForSquad_RCV
case _ =>
ko
}
}
"encode" in {
val msg = GenericActionMessage(37)
val msg = GenericActionMessage(GenericAction.NotLookingForSquad_RCV)
val pkt = PacketCoding.encodePacket(msg).require.toByteVector
pkt mustEqual string