* Initial commit The client is currently only capable of registering for play * Switch to serde for json serialization * Parse all JSON messages Or rather all messages sent in the game * Switch to rust nightly for serde This mainly solves the whole json parsing problem reasonably well * Move move logic to snake module * Add util functions * Improve error handling in main * Implement utility functions on map struct And keep those that do not deal with the map in the util module * Refactor and improve the maputils * Add test cases to maputil functions Also fix the snake panicking due to an incorrect unwrap * Fix snake panicking due to bad unwrap Missed staging these in the last commit... * Add logging * Add a heart beat to the client Needs some proper error handling however * Handle errors properly in main.rs Also refactor to improve readability * Print what is happening to console * Add readme file Also lock the package versions used and update to latest nightly
33 lines
562 B
TOML
33 lines
562 B
TOML
[appenders.console]
|
|
level = "info"
|
|
kind = "console"
|
|
|
|
[appenders.console.encoder]
|
|
pattern = "{d(%+)(local)} [{t}] {h({l})} {M}:{m}{n}"
|
|
|
|
[appenders.client]
|
|
kind = "file"
|
|
path = "log/client.log"
|
|
pattern = "{d} [{t}] {l} {M}:{m}{n}"
|
|
level = "debug"
|
|
|
|
[appenders.snake]
|
|
kind = "file"
|
|
path = "log/snake.log"
|
|
pattern = "{d} [{t}] {l} {M}:{m}{n}"
|
|
level = "debug"
|
|
|
|
[root]
|
|
level = "info"
|
|
appenders = [ "console" ]
|
|
|
|
[logger.client]
|
|
level = "debug"
|
|
appenders = [ "client" ]
|
|
additive = false
|
|
|
|
[logger.snake]
|
|
level = "debug"
|
|
appenders = [ "snake", "console" ]
|
|
additive = false
|