GeezerVison is showing github.com — Porco Ok · pythonprobr/pythonbirds@15c9c6c
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: atores.py +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,6 +52,10 @@ class Obstaculo(Ator): | 52 | 52 | _caracter_destruido = ' ' | 53 | 53 |
| 54 | 54 |
| | 55 | +class Porco(Ator): | | 56 | + _caracter_ativo = '☺' | | 57 | + | | 58 | + | 55 | 59 |
| 56 | 60 |
| 57 | 61 |
|
Collapse file Copy file name to clipboardExpand all lines: testes/atores_testes.py +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 |
| 3 | 3 | from __future__ import unicode_literals | 4 | 4 | from unittest.case import TestCase | 5 | | -from atores import Ator, DESTRUIDO, ATIVO, Obstaculo | | 5 | +from atores import Ator, DESTRUIDO, ATIVO, Obstaculo, Porco | 6 | 6 |
| 7 | 7 |
| 8 | 8 | def assert_ator_status(test_case, ator, caracter_status_ativo, carater_status_destruido): | @@ -65,7 +65,7 @@ def teste_nao_colisao_entre_atores_ativos(self): | 65 | 65 |
| 66 | 66 | def teste_colisao_somente_um_ator_destruido(self): | 67 | 67 | ator = Ator(2, 2) | 68 | | - ator.colidir(ator,0) | | 68 | + ator.colidir(ator, 0) | 69 | 69 | ator2 = Ator(2, 2) | 70 | 70 | self.assert_nao_colisao(ator, ator2) | 71 | 71 | self.assert_nao_colisao(Ator(2, 3), ator) | @@ -96,6 +96,7 @@ def teste_status(self): | 96 | 96 | obstaculo = Obstaculo() | 97 | 97 | assert_ator_status(self, obstaculo, 'O', ' ') | 98 | 98 |
| | 99 | + | 99 | 100 | class PorcoTestes(TestCase): | 100 | 101 | def teste_status(self): | 101 | 102 | porco = Porco() | |
|