@@ -6,10 +6,9 @@ package scalatron.botwar
6
6
import renderer .Renderer
7
7
import scalatron .botwar .BotWarSimulation .SimState
8
8
import java .awt .event .{WindowEvent , WindowAdapter , KeyEvent , KeyListener }
9
- import scalatron .scalatron .api .Scalatron
10
- import scalatron .scalatron .impl .{TournamentRoundResult , TournamentState , Plugin , PluginCollection , Game }
11
9
import akka .dispatch .ExecutionContext
12
10
import akka .actor .ActorSystem
11
+ import scalatron .core ._
13
12
14
13
15
14
/** BotWar: an implementation of the Scalatron Game trait.
@@ -18,12 +17,7 @@ case object BotWar extends Game
18
17
{
19
18
val name = Constants .GameName
20
19
21
- val pluginLoadSpec =
22
- PluginCollection .LoadSpec (
23
- Scalatron .Constants .JarFilename , // "ScalatronBot.jar"
24
- " scalatron.botwar.botPlugin" ,
25
- " ControlFunctionFactory" )
26
-
20
+ def gameSpecificPackagePath = " scalatron.botwar.botPlugin"
27
21
28
22
def runVisually (
29
23
pluginPath : String ,
@@ -95,7 +89,7 @@ case object BotWar extends Game
95
89
}
96
90
97
91
98
- var pluginCollection = PluginCollection (pluginPath, pluginLoadSpec , verbose)
92
+ var pluginCollection = PluginCollection (pluginPath, gameSpecificPackagePath , verbose)
99
93
100
94
// now perform game runs ad infinitum
101
95
var roundIndex = 0
@@ -166,7 +160,7 @@ case object BotWar extends Game
166
160
tournamentState.addResult(tournamentRoundResult)
167
161
}
168
162
169
- var pluginCollection = PluginCollection (pluginPath, pluginLoadSpec , verbose)
163
+ var pluginCollection = PluginCollection (pluginPath, gameSpecificPackagePath , verbose)
170
164
171
165
// now perform game runs ad infinitum
172
166
var roundIndex = 0
@@ -208,7 +202,7 @@ case object BotWar extends Game
208
202
* @return the initial simulation state
209
203
*/
210
204
def startHeadless (
211
- plugins : Iterable [Plugin .External ],
205
+ plugins : Iterable [Plugin .FromJarFile ],
212
206
secureMode : Boolean ,
213
207
argMap : Map [String ,String ]
214
208
)(
@@ -240,7 +234,7 @@ case object BotWar extends Game
240
234
* @return the initial simulation state
241
235
*/
242
236
def startHeadless (
243
- plugins : Iterable [Plugin .External ],
237
+ plugins : Iterable [Plugin .FromJarFile ],
244
238
permanentConfig : PermanentConfig ,
245
239
gameConfig : Config
246
240
)(
0 commit comments