1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00
Commit Graph

13 Commits

Author SHA1 Message Date
John Zaitseff
ab9a9359e2 Implement the show_map() function that displays the galaxy map 2011-07-15 11:19:14 +10:00
John Zaitseff
e46c45d52e Implement the select_moves() function
This function select random moves for the current player.
2011-07-14 21:44:18 +10:00
John Zaitseff
39d6bc5b37 Add the abort_game global variable
The abort_game variable allows the program to abort the game without
showing the final winner.
2011-07-14 15:11:53 +10:00
John Zaitseff
200f7cdf97 Revise the scramble() and unscramble() functions
The scramble() and unscramble() functions now use a moving (incrementing)
key for the XOR encryption/decryption.  Also include a table of XOR keys
to use at random for encryption.
Revised the scramble() and unscramble() functions to use a moving
(incrementing) key for the XOR encryption/decryption.  Also generated a
table of XOR keys to use at random for encryption.
2011-07-14 12:30:23 +10:00
John Zaitseff
91d77f002c Bug fix: resolve memory leakage for the filename variable 2011-07-13 18:18:02 +10:00
John Zaitseff
593cda9a97 Add to the save_game() function to save the current game to disk 2011-07-13 12:52:38 +10:00
John Zaitseff
0b9b60780d Bug fix: actually copy the string read in to the destination buffer 2011-07-13 12:51:25 +10:00
John Zaitseff
1c502d671c Load a game file; support (trivial) game file encryption 2011-07-11 23:23:21 +10:00
John Zaitseff
c5eda1eaab Add code to the load_game() function
The load_game() function now checks for errors while opening the game
file.
2011-07-11 18:07:51 +10:00
John Zaitseff
89c3512a1b Modify the wait_for_key() routine to take a window attribute parameter 2011-07-11 17:57:52 +10:00
John Zaitseff
86b88e8929 Allow a player to quit at the first prompt ("Enter number of players") 2011-07-11 17:48:16 +10:00
John Zaitseff
cdaeb2e869 Add the init_game() function that initialises the actual game 2011-07-11 16:14:07 +10:00
John Zaitseff
9a39c84bf4 Add source files game.c and game.h
These files will eventually contain many of the game functions.
2011-07-04 15:54:39 +10:00