Commit Graph

23 Commits

Author SHA1 Message Date
2137fbd565 Fix self-nibbling 2017-10-31 19:01:20 +01:00
366d39c0a7 Actualize readme.md 2017-10-20 21:44:20 +02:00
e274bd37e7 Initial Commit for snake ten_points_to_slytherin 2017-10-20 21:38:35 +02:00
061da11d43 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.
2017-04-21 15:49:42 +02:00
435bd355d4 Added BSD3-Clause license. (#6)
* Added BSD3-Clause license.

This makes the project open source.

https://spdx.org/licenses/BSD-3-Clause-Clear.html#licenseText

* Added LICENSE-file.
2017-04-09 19:42:37 +02:00
6ef2a77176 And we're on rust stable 🎉 2017-03-08 18:32:00 +01:00
8ca8392b03 Move snake name and venue into configuration file 2016-09-26 13:25:13 +02:00
576d4d6975 Configure host and port via external file 2016-09-26 11:41:06 +02:00
dce423481a Send ClientInfo to the server 2016-09-23 16:15:56 +02:00
f14a6a5af9 Walls are counted as non-movable 2016-09-20 19:42:55 +02:00
f6b7b1c53d Update tests according to updated API 2016-09-20 19:10:02 +02:00
4c83cc4b4a Sort out some logging problems 2016-09-20 19:02:02 +02:00
5b65df2596 Fix broken testcases 2016-09-13 17:17:26 +02:00
5409d8c2ff Minor fixes to messages 2016-09-13 16:59:00 +02:00
add19e1ab2 Minor update 2016-09-13 12:56:10 +02:00
f88009d206 Update GameSettings and add GameLinkEvent 2016-09-13 12:45:24 +02:00
a21fff4912 Add jenkins icon 2016-08-29 14:33:01 +02:00
356551af24 Resolve incorrect imports in tests 2016-08-29 14:26:34 +02:00
4771dd09f6 Update documentation and dependencies 2016-08-29 13:12:52 +02:00
3a8f747869 Updated link to repo 2016-07-07 23:08:26 +02:00
cee70480ce Refactor rust client 2016-06-18 13:11:22 +02:00
bd42296f15 Handle tournament mode correctly
And close websocket on game end in training mode as well
2016-06-07 22:27:26 +02:00
01c87721ae A Rust client (#18)
* 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
2016-06-07 20:04:57 +02:00