Skip to content

Commit f0abb30

Browse files
committed
Minor changes to be more consistent
1 parent f4c067e commit f0abb30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Scalatron/src/scalatron/botwar/Entity.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ object Bot {
138138

139139
def computeBotInputForMaster(bot: Bot, state: State): String = {
140140
val view = state.flattenedBoard.computeView(bot.pos, Constants.MasterHorizonHalfSize)
141-
computeControlFunctionInput(view)
141+
computeControlFunctionInput(view, None)
142142
}
143143

144-
def computeControlFunctionInput(view: FlattenedBoard, maybeDeltaToMaster: Option[XY] = None): String = {
144+
def computeControlFunctionInput(view: FlattenedBoard, deltaToMasterOpt: Option[XY]): String = {
145145
view.occlude() // caution: in situ!
146146
val renderedView = view.cells.map(cell => Player.cellContentToChar(cell, bot) ).mkString
147147
val stateMapString =
@@ -150,7 +150,7 @@ object Bot {
150150
.map(entry => entry._1 + "=" + entry._2)
151151
.mkString(",")
152152
val maybeMasterParameter =
153-
maybeDeltaToMaster
153+
deltaToMasterOpt
154154
.map(Protocol.ServerOpcode.ParameterName.Master + "=" + _ + ",")
155155
.getOrElse("")
156156
val controlFunctionInput =

0 commit comments

Comments
 (0)