Exemplo n.º 1
0
    def testGameEndedAfterWinningMove(self):
        ballPosition = np.array([99.5, 2])
        ballVelocity = np.array([2, 0.1])
        pongGame = Pong(ballVelocity, ballPosition)

        pongGame = pongGame.makeMove(1, NOTHING)
        pongGame = pongGame.makeMove(2, NOTHING)

        self.assertTrue(pongGame.gameEnded())
Exemplo n.º 2
0
    def testGameNotEndedAfterMoves(self):
        pongGame = Pong()
        pongGame.makeMove(1, NOTHING)
        pongGame.makeMove(2, NOTHING)

        self.assertFalse(pongGame.gameEnded())