aboutsummaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-05-03 21:15:05 -0400
committerNathan Vance <nathav63@gmail.com>2015-05-03 21:15:05 -0400
commit3e9f426d734a559ead5e1b087fb02cab31811e95 (patch)
tree2ed86d1d5b3203f91baf85c6a15afea69b197fee /data.c
parentFixed bug causing array content to be overwritten (diff)
download7w-3e9f426d734a559ead5e1b087fb02cab31811e95.tar.gz
7w-3e9f426d734a559ead5e1b087fb02cab31811e95.tar.bz2
7w-3e9f426d734a559ead5e1b087fb02cab31811e95.zip
Added basic view of game results
Diffstat (limited to 'data.c')
-rw-r--r--data.c12
1 files changed, 12 insertions, 0 deletions
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();
}
bgstack15