• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

globuli94 / snakesandladders / 7213528966

14 Dec 2023 07:17PM UTC coverage: 46.415% (-1.1%) from 47.49%
7213528966

push

globuli94
Controller Component, ContollerBaseImplementation, ControllerMockImplementation

7 of 14 new or added lines in 3 files covered. (50.0%)

3 existing lines in 2 files now uncovered.

123 of 265 relevant lines covered (46.42%)

0.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/src/main/scala/snakes/controller/controllerBaseImpl/Controller.scala
1
package snakes.controller.controllerBaseImpl
2

3
import snakes.controller.ControllerInterface
4
import snakes.model.aGame
5
import snakes.util.{Dice, Event, Observable, UndoManager}
6

7
case class Controller(var game: aGame) extends ControllerInterface with Observable {
1✔
8
  val undoManager = new UndoManager
9

1✔
10
  override def create(size:Int): Unit = {
1✔
11
    game = game.createGame(size)
1✔
12
    notifyObservers(Event.Create)
13
  }
1✔
14
  override def addPlayer(name:String): Unit =
1✔
15
    game = game.createPlayer(name)
1✔
16
    notifyObservers(Event.AddPlayer)
17

1✔
18
  override def roll(): Unit =
1✔
19
    undoManager.doStep(RollCommand(this, Dice().rollDice))
1✔
20
    notifyObservers(Event.Roll)
21

1✔
22
  override def undo(): Unit =
1✔
23
    undoManager.undoStep()
1✔
24
    notifyObservers(Event.Undo)
25

×
NEW
26
  override def exit(): Unit = {
×
27
    sys.exit(0)
28
  }
29

1✔
30
  override def toString: String =
1✔
31
    game.toString
32
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc