chrisgillis / slackwolf

A slack bot that moderates Werewolf games
343 stars 68 forks source link

Adding weather effect sytem (#51) #57

Closed GrumpyMurloc closed 7 years ago

GrumpyMurloc commented 7 years ago

Added the Weather system in issue #51. Create a new formatter that return a message at the beginning of the day and the night determined by the attribute Weather contained in the class "Game".

This is my first pull request, any comment are appreciated, either on code or git.

Signed-off-by: GrumpyMurloc leblanc.nicolas@hotmail.com

GrumpyMurloc commented 7 years ago

I'll make the suggested modification as soon as possible. As for the reason why the message is sent only if the seer role is enable is because I replaced the old message for the weather formatter and didn't realize this condition. This will be corrected in the next commit.

Thanks for all the comments, I'm still learning and that help me a lot.

chrisgillis commented 7 years ago

Awesome :) I think this project is great for learning PHP. While it's not particularly well written and it doesnt have unit tests or anything, it's still relatively simple PHP!

Pull requests and code reviews should always be treated as learning opportunities, not just for the author of the code being reviewed but for the reviewer as well!

Thanks again for contributing :)

GrumpyMurloc commented 7 years ago

Finished adding the modification ( finally got time to do it ). I changed a lot of on how the WeatherFormatter work. Right now weather is not an attribute of the game anymore.

Added a weight system for the weather and deactivated the WeatherCommand. Added a Data folder containing the various messages.