Example #1
0
 @Test
 public void answerCorrectlyButNotSoonEnough() {
   g.setAnswerTime(-1);
   g.take(P1);
   g.answer(true);
   assertEquals(-200, g.scoreFor(P1));
 }
Example #2
0
 @SuppressWarnings("serial")
 @Before
 public void createBoardAndGame() throws FileNotFoundException {
   b = new Board();
   b.add("C", 200, "A", "Q");
   g = new Game();
   g.setOutputStream(new PrintStream(new ByteArrayOutputStream()));
   g.setBoard(b);
   g.setAnswerTime(1);
   g.addPlayer(P1);
   g.addPlayer(P2);
   g.start();
   g.select("C", 200);
 }