File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,15 @@ abstract class AbstractClient @Throws(IOException::class) constructor(
103
103
}
104
104
}
105
105
106
- fun joinAnyGame () =
107
- client.joinRoomRequest(gameType)
106
+ private fun start () {
107
+ client.start()
108
+ client.addListener(this )
109
+ }
110
+
111
+ fun joinAnyGame () {
112
+ start()
113
+ client.joinRoomRequest(gameType)
114
+ }
108
115
109
116
override fun onGameJoined (roomId : String ) {}
110
117
override fun onGamePrepared (response : PrepareGameProtocolMessage ) {}
@@ -123,6 +130,8 @@ abstract class AbstractClient @Throws(IOException::class) constructor(
123
130
}
124
131
}
125
132
126
- fun joinPreparedGame (reservation : String ) =
127
- client.joinPreparedGame(reservation)
133
+ fun joinPreparedGame (reservation : String ) {
134
+ start()
135
+ client.joinPreparedGame(reservation)
136
+ }
128
137
}
Original file line number Diff line number Diff line change @@ -3,12 +3,11 @@ package sc.plugin2021
3
3
import sc.api.plugins.IGameInstance
4
4
import sc.api.plugins.IGamePlugin
5
5
import sc.api.plugins.host.IGamePluginHost
6
- import sc.plugin2020.GamePlugin
7
- import sc.plugin2020.util.Configuration.classesToRegister
6
+ import sc.plugin2021.util.Configuration.classesToRegister
8
7
import sc.plugins.PluginDescriptor
9
8
import sc.shared.ScoreDefinition
10
9
11
- @PluginDescriptor(name = " Blokus" , uuid = GamePlugin . PLUGIN_UUID , author = GamePlugin . PLUGIN_AUTHOR )
10
+ @PluginDescriptor(name = " Blokus" , uuid = " swc_2021_blokus " , author = " " )
12
11
class GamePlugin : IGamePlugin {
13
12
14
13
companion object {
You can’t perform that action at this time.
0 commit comments