Esempio 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())
Esempio n. 2
0
    def testGameNotEndedAfterMoves(self):
        pongGame = Pong()
        pongGame.makeMove(1, NOTHING)
        pongGame.makeMove(2, NOTHING)

        self.assertFalse(pongGame.gameEnded())