Skip to content

Commit 88cba4c

Browse files
committed
Preparing for pluggable games
1 parent f39efc0 commit 88cba4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+180
-101
lines changed

Scalatron/src/scalatron/botwar/AugmentedDynamics.scala renamed to BotWar/src/scalatron/botwar/AugmentedDynamics.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package scalatron.botwar
55

66
import scala.util.Random
77
import scalatron.botwar.Decoration.{Bonus, Explosion, Text, Bonk, Annihilation}
8-
import scalatron.scalatron.impl.TournamentRoundResult
8+
import scalatron.game.TournamentRoundResult
99

1010

1111
case object AugmentedDynamics extends ((State,Random,Iterable[(Entity.Id,Iterable[Command])]) => Either[State,TournamentRoundResult])

Scalatron/src/scalatron/botwar/Board.scala renamed to BotWar/src/scalatron/botwar/Board.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ package scalatron.botwar
55

66
import State.Time
77
import scala.util.Random
8-
import scalatron.scalatron.impl.Plugin
98
import BoardParams.Perimeter
9+
import scalatron.game.Plugin
1010

1111

1212
/** Contains the temporally variable aspects of the game state.
File renamed without changes.

Scalatron/src/scalatron/botwar/BotWar.scala renamed to BotWar/src/scalatron/botwar/BotWar.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ package scalatron.botwar
66
import renderer.Renderer
77
import scalatron.botwar.BotWarSimulation.SimState
88
import java.awt.event.{WindowEvent, WindowAdapter, KeyEvent, KeyListener}
9-
import scalatron.scalatron.api.Scalatron
10-
import scalatron.scalatron.impl.{TournamentRoundResult, TournamentState, Plugin, PluginCollection, Game}
119
import akka.actor.ActorSystem
10+
import scalatron.game._
1211

1312

1413
/** BotWar: an implementation of the Scalatron Game trait.
@@ -18,8 +17,8 @@ case object BotWar extends Game
1817
val name = Constants.GameName
1918

2019
val pluginLoadSpec =
21-
PluginCollection.LoadSpec(
22-
Scalatron.Constants.JarFilename, // "ScalatronBot.jar"
20+
PluginLoadSpec(
21+
"ScalatronBot.jar", // TODO: was: Scalatron.Constants.JarFilename
2322
"scalatron.botwar.botPlugin",
2423
"ControlFunctionFactory")
2524

Scalatron/src/scalatron/botwar/BotWarSimulation.scala renamed to BotWar/src/scalatron/botwar/BotWarSimulation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package scalatron.botwar
55

66
import scala.util.Random
7-
import scalatron.scalatron.impl.{Plugin, TournamentRoundResult}
87
import akka.actor.ActorSystem
8+
import scalatron.game.{Plugin, TournamentRoundResult}
99

1010

1111
/** Implementations of generic Simulation traits for the BotWar game. */
File renamed without changes.
File renamed without changes.

Scalatron/src/scalatron/botwar/Config.scala renamed to BotWar/src/scalatron/botwar/Config.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
package scalatron.botwar
55

6-
import scalatron.scalatron.impl.Plugin
6+
import scalatron.game.Plugin
77

88

99
/** Configuration container for a specific game rounds. Incorporates the permanent configuration
File renamed without changes.

Scalatron/src/scalatron/botwar/Display.scala renamed to BotWar/src/scalatron/botwar/Display.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package scalatron.botwar
66
import java.awt.geom.AffineTransform
77
import java.awt.{Toolkit, Frame, Graphics2D}
88
import scalatron.botwar.Display.RenderTarget
9-
import scalatron.Version
109

1110

1211
object Display {
@@ -39,7 +38,8 @@ object Display {
3938
case Some(s) => if(s.toLowerCase=="max") screenSize.getHeight.intValue else s.toInt
4039
}
4140

42-
val frame = createFrame(windowSizeX, windowSizeY, "Scalatron " + Constants.GameName + " " + Version.VersionString)
41+
val versionString = "2.0.0.0" // TODO; was: Version.VersionString
42+
val frame = createFrame(windowSizeX, windowSizeY, "Scalatron " + Constants.GameName + " " + versionString)
4343

4444
Display(frame)
4545
}

0 commit comments

Comments
 (0)