Skip to content

Commit

Permalink
Remove emt from Study
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Apr 12, 2024
1 parent f2f3e4a commit 3cd4f66
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
4 changes: 1 addition & 3 deletions modules/study/src/main/NewPgnImport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ object NewPgnImport:
glyphs = Glyphs.empty,
opening = None,
crazyData = replay.setup.situation.board.crazyData,
clock = parsedPgn.tags.clockConfig.map(_.limit),
emt = None
clock = parsedPgn.tags.clockConfig.map(_.limit)
),
parsedPgn.tree.flatMap(makeTree(replay.setup, _, annotator))
)
Expand Down Expand Up @@ -120,7 +119,6 @@ object NewPgnImport:
glyphs = data.metas.glyphs,
opening = None,
clock = clock,
emt = emt,
crazyData = game.situation.board.crazyData
)
).some
Expand Down
2 changes: 0 additions & 2 deletions modules/study/src/main/PgnImport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ object PgnImport:
comments = comments,
glyphs = Glyphs.empty,
clock = parsedPgn.tags.clockConfig.map(_.limit),
emt = none,
crazyData = replay.setup.situation.board.crazyData,
children = parsedPgn.tree.fold(Branches.empty)(makeBranches(replay.setup, _, annotator))
)
Expand Down Expand Up @@ -142,7 +141,6 @@ object PgnImport:
comments = comments,
glyphs = node.value.metas.glyphs,
clock = clock,
emt = emt,
crazyData = game.situation.board.crazyData,
children = node.child.fold(Branches.empty)(makeBranches(game, _, annotator))
).some
Expand Down
3 changes: 0 additions & 3 deletions modules/tree/src/main/newTree.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ case class Metas(
glyphs: Glyphs = Glyphs.empty,
opening: Option[Opening] = None,
clock: Option[Centis] = None,
emt: Option[Centis] = None,
crazyData: Option[Crazyhouse.Data] = None
// TODO, add support for variationComments
):
Expand Down Expand Up @@ -80,7 +79,6 @@ case class NewBranch(
glyphs,
opening,
clock,
emt,
crazyData
}
override def toString = s"$ply, $id, ${move.uci}"
Expand Down Expand Up @@ -169,7 +167,6 @@ object NewTree:
node.glyphs,
node.opening,
node.clock,
node.emt,
node.crazyData
)

Expand Down
3 changes: 0 additions & 3 deletions modules/tree/src/main/tree.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ sealed trait Node:
def addChild(branch: Branch): Node
def dropFirstChild: Node
def clock: Option[Centis]
def emt: Option[Centis]
def forceVariation: Boolean

// implementation dependent
Expand Down Expand Up @@ -192,7 +191,6 @@ case class Root(
children: Branches = Branches.empty,
opening: Option[Opening] = None,
clock: Option[Centis] = None, // clock state at game start, assumed same for both players
emt: Option[Centis] = None,
crazyData: Option[Crazyhouse.Data]
) extends Node:

Expand Down Expand Up @@ -323,7 +321,6 @@ case class Branch(
opening: Option[Opening] = None,
comp: Boolean = false,
clock: Option[Centis] = None, // clock state after the move is played, and the increment applied
emt: Option[Centis] = None, // estimated move time
crazyData: Option[Crazyhouse.Data],
forceVariation: Boolean = false // cannot be mainline
) extends Node:
Expand Down

0 comments on commit 3cd4f66

Please sign in to comment.