Refactored the Rust Snakebot codebase. (#7)

* Normal logging now logs to stdout;
  * Renamed Inbound::GameLinkEvent to Inbound::Gamelink;
  * Renamed the struct GameResultSnake to GameResult;
  * Added Inbound::GameResult;
* Rewrote the message handling to become more succinct;
* Turned the default_gamesettings function into a Default impl;
* Made the snake smaller and prettier;
* Replaced some direction checking code with less code;
* Added logging messages to all callbacks;
* Added as_movement_delta to the Direction impl;
* Added nice error messages to the message parsing;
* Moved some code in maputil to increase the DRY-factor.
This commit is contained in:
Rembane
2017-04-21 15:49:42 +02:00
committed by Martin Barksten
parent 435bd355d4
commit 061da11d43
6 changed files with 156 additions and 261 deletions

View File

@ -23,5 +23,5 @@ additive = false
[loggers.snake]
level = "debug"
appenders = [ "snake" ]
appenders = [ "console" ]
additive = false