Commit graph

66 commits

Author SHA1 Message Date
2ee68e74ac Enqueue the incoming commands at the next tick
This sync commands for all users and in the future will let you view which moves and commands are currently being executed
2020-06-09 20:44:25 +01:00
6a868d3e41 Fix up TODOs and comments that have now been done 2020-06-09 18:33:30 +01:00
51fe918090 Split out maths functions into maths, vector and bearing 2020-06-09 18:08:07 +01:00
aae668fb57 Fix instabilities caused by random rocks 2020-06-09 00:16:49 +01:00
43588c0e4b Fix world spawning and radar
Also expand test coverage a little to ensure it's correct
2020-06-08 23:32:52 +01:00
b0e076ac1a Refactor radar to return a full set of the tiles within rover range 2020-06-08 18:14:24 +01:00
65818ed0e1 Renamethe spawn world function 2020-06-07 23:05:55 +01:00
43648926ca Large refactor to properly implement radar
/radar now returns a set of non-empty tile blips
2020-06-07 22:30:03 +01:00
3781a4d10d Spawn a border around the world atlas for now
Also spawn the rover within a single chunk in the middle
2020-06-07 18:57:44 +01:00
8586bdabd7 Fix duplicate saving on quit
Slight refactor to split server stop and close functions
	Quit function explicitly sends SIGTERM
	SIGTERM doesn't trigger an os.Exit

	Bonus: Properly save the world on spawning the rover
2020-06-07 18:06:34 +01:00
ca17d89f6e Fix logging of rover spawn 2020-06-07 13:32:37 +01:00
50cc8b5dbf Minor cleanups 2020-06-06 18:44:24 +01:00
5e1f9b0d31 Refactor rover attributes to add a name 2020-06-06 16:52:30 +01:00
db38ad6091 Add tick information to server status 2020-06-06 16:37:57 +01:00
6ac5a559b5 Add missing newlines to prints 2020-06-06 16:33:56 +01:00
ea67fe1cbe Fix executing a tick every second for a minute 2020-06-06 16:31:39 +01:00
3a36f8f84f Add logging to all handlers 2020-06-06 16:26:44 +01:00
c6fbf1341a Allow the server tick to be customised 2020-06-06 16:01:49 +01:00
573bfbf9c7 Add cron tick of command queue 2020-06-06 15:52:03 +01:00
0a0a32cf58 Implement a command queue on the world
Not currently executed
2020-06-06 14:44:59 +01:00
e3ce87e964 Simplify duplicate command types 2020-06-06 12:45:45 +01:00
1d2087e2b9 Fix test instabilities by refactoring to make address dynamic and readable 2020-06-06 11:52:12 +01:00
bc366583a4 Move server tests to the server command 2020-06-06 10:57:37 +01:00
3bfbe38837 De-integration the cmd/rove tests as well and massively simplify the tests output 2020-06-06 00:47:48 +01:00
79c07f359b De-integration the api tests by launching their own server 2020-06-06 00:36:08 +01:00
cade908ed2 Refactor APIs to take an /{accountid}/ prefix 2020-06-05 23:08:59 +01:00
9ae1f50f46 Rename /commands to /command
Make it a verb not a GET fetch
2020-06-05 22:34:32 +01:00
9d57f48f98 Add /rover command to get rover info 2020-06-05 22:23:01 +01:00
f82565bf22 Refactor and implement the api functions 2020-06-05 17:59:14 +01:00
3474e6ca8c Pull out API definitions and testing into it's own package 2020-06-05 17:24:27 +01:00
aa2ecace89 Don't send the empty error value in responses 2020-06-05 17:03:08 +01:00
6ef69cec02 Even more cleanup and refactor to simplify handlers 2020-06-05 16:52:15 +01:00
bd83621add Small command handling fixes 2020-06-05 16:43:25 +01:00
be0f4f1aff Convert bearings to compass points and locations to int coords 2020-06-05 16:37:52 +01:00
14977de5bc Rename /view to /radar and fill in more of the response 2020-06-04 22:14:55 +01:00
b2b782f61d Add failing empty test for /view 2020-06-04 22:02:33 +01:00
6461b51c5c Fully implement the bearing based movement
Instant, and without limit, for now
2020-06-04 21:59:00 +01:00
0fbad15c01 Huge Instance -> Rover refactor, for clarification 2020-06-04 21:19:25 +01:00
33f25a7414 Prepare to refactor movement to be based on attributes 2020-06-04 18:54:33 +01:00
d0a5b91de7 Describe each api method 2020-06-04 18:39:36 +01:00
4126da61cc Simplify API calls and pull them out to their own file 2020-06-04 18:36:26 +01:00
79914ba728 Fix name of routes file
And fix function name
2020-06-04 18:30:40 +01:00
6f248f1bd2 Small server refactor and rename 2020-06-04 18:10:55 +01:00
de1b3c36e2 Clean up integration tests 2020-06-04 18:02:41 +01:00
376a036067 Large refactor to server code to re-organise 2020-06-04 17:53:25 +01:00
88844c0056 Pull handlers into their own file 2020-06-04 17:23:27 +01:00
b95d92350a Refactor route handlers 2020-06-04 17:21:23 +01:00
fd4b4205ba Add empty implementation of /view 2020-06-04 16:57:38 +01:00
e2857d7506 Add the /commands path to handle a set of commands
Entirely synchronous now but allows for the "move" command
2020-06-03 18:40:19 +01:00
e5d5d123a6 Add the concept of commands to the world and executing them 2020-06-03 18:12:08 +01:00