-
Notifications
You must be signed in to change notification settings - Fork 2
Comments
Conversation
freegames/pacman_oop.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pensar em exercícios mais adequados para OO e o código atual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- crie um método onde verifica se o pacman se alimentou. se sim, faça as ações necessárias
- altere a forma de instancia dos fantasmas
- crie um atributo speed e faça as alterações necessárias para mudar a velocidade do pacman de acordo com seu valor
o que o senhor acha dessas 3 ?
(ps, ainda irei traduzir por inglês)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 eu achei OK, apesar de que talvez gere muitas dúvidas. Não sei se faria sentido fazer citar o Snake, talvez sim. Faça isso.
1 e 2 não tenho muito certeza. Olhando o código o método de 1 seria pra substituir parte de draw_score, certo? draw_score está com duas responsabilidade: verificando se comeu e desenhando os pontos. Isso me passou despercebido.
Então, talvez pudesse ser mais explícito: mova a variável/atributo de score para a classe Pacman. Essa atributo deverá ser incrementado por um novo método em pacman (eat). Altere draw_score de acordo e outras mudanças necessárias em GamePacman.
A alteração da instância dos fantasmas também não ficou clara.
Porém, a melhor forma de validar isso é resolvendo os exercícios. Então resolva-os. (Você iria fazer isso de qualquer forma, iremos colocar isso no RPP).
No meio do caminho, vai pensando em um 4o exercício. Ah, já pensei: Crie uma superclasse para Pacman e Ghost.
Talvez também valha a pena ter subclasses de Ghost. Isso substituiria fácil o exercício 2, ou seria uma forma de materializá-lo, deixando explícito.
Desafio extra: criar comidas diferentes.
ps: você pode escrever os exercícios e a gente faz o PR. Enquanto o PR é avaliado, você vai validando e a gente atualiza o ramo do PR se for necessário.
@adorilson
adorilson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrenoNAlmeida faz teu nome.
freegames/pacman_oop.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apagar e ver o que acontecer. E resolver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feito
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mas o que aconteceu quando apagou? 😅 Teve que resolver algo? Fez como?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quando apaguei, ele apenas parou de aparecer o score e de comer as bolinhas brancas, ai fiz as alterações que tão no commit a frente e deu certo.
@adorilson
adorilson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Novas solicitações.
@adorilson
adorilson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mais alguns pequenas correções a serem feitas.
freegames/pacman_oop.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apenas show e hide. food_ é desnecessário.
@adorilson
adorilson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Algumas pequenas correções mais.
No description provided.