From 84b90fce2dbe99ad738e53ad6416000765e18c00 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Tue, 4 Jan 2011 22:36:06 +0100 Subject: added game loop entry with mainstack; shuffle it at beginning --- src/game.c | 40 ++++++++++++++++++++++++++++++++++++++++ src/game.h | 9 +++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/game.c create mode 100644 src/game.h (limited to 'src') diff --git a/src/game.c b/src/game.c new file mode 100644 index 0000000..a7e33be --- /dev/null +++ b/src/game.c @@ -0,0 +1,40 @@ +#include "game.h" +#include "card.h" +#include +#include +#include + +void init_mainstack(card* stack, const uint32_t size) +{ + // assign card values to main stack + for(uint32_t i=0, val=MIN_CARD; i