From 3e9f426d734a559ead5e1b087fb02cab31811e95 Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Sun, 3 May 2015 21:15:05 -0400 Subject: Added basic view of game results --- data.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'data.c') diff --git a/data.c b/data.c index aa08fda..f69a87b 100644 --- a/data.c +++ b/data.c @@ -26,6 +26,7 @@ void write_trade(int player, int tradel, int trader); void player_turn(int player); void haltError(char *message, int num); void arraycpy(int *from, int *to, int len); +void endgame(); #define MISC 3 #define DATAGOLD 0 @@ -284,6 +285,11 @@ void data_addvictory(int p) player[p][3][4] += amnt; } +int data_getvictories(int p) +{ + return player[p][3][4]; +} + int data_getgold(int p) { return player[p][3][3] + turngoldbuffer[p]; @@ -617,6 +623,11 @@ int data_gettotvps(int p) return tot; } +int* data_getplayerdat(int p) +{ + return player[p][3]; +} + int data_potentialvps(int p, int era, int card) { int i; @@ -655,5 +666,6 @@ void data_endgame() } io_printborder(x, y++, width); io_getkey(); + endgame(); halt(); } -- cgit