This commit is contained in:
2017-08-23 21:15:18 +02:00
parent 6c168a8618
commit d9f9acc87c
5 changed files with 76 additions and 84 deletions

View File

@@ -14,5 +14,5 @@ const char figure[6][5] = {{" O "}, \
/* This array represents the layers where the strings /* This array represents the layers where the strings
of the current stage(array index) should be printed*/ of the current stage(array index) should be printed */
const int stages[] = {0, 1, 1, 1, 2, 2}; const int stages[] = {0, 1, 1, 1, 2, 2};

View File

@@ -15,7 +15,6 @@
#include "figures.h" #include "figures.h"
int main(int argc, char **argv) { int main(int argc, char **argv) {
const char *short_options = "w:hf:ct"; const char *short_options = "w:hf:ct";
@@ -489,9 +488,6 @@ void trollHandleImpressive(hitfeed *hf, game_state *gs, int hits) {
} }
} }
void drawFigure(game_state *gs, int drawNext) { void drawFigure(game_state *gs, int drawNext) {
int row = 6; int row = 6;
int length = 8; int length = 8;
@@ -525,5 +521,3 @@ void animateLineClear(game_state *gs, int line, int offsetMultiplier) {
mvprintw(line, k, " "); mvprintw(line, k, " ");
} }
} }

View File

@@ -1,8 +1,6 @@
#include <time.h> #include <time.h>
/* Defined macros */ /* Defined macros */
#define DEFAULTTRIES 6 #define DEFAULTTRIES 6
#define MAXWORDLENGTH 200 #define MAXWORDLENGTH 200

4
prng.c
View File

@@ -44,7 +44,7 @@ void InitializePRNG(const uint32_t seed)
index = N; index = N;
} }
static void Twist() static void Twist(void)
{ {
uint32_t i, x, xA; uint32_t i, x, xA;
@@ -64,7 +64,7 @@ static void Twist()
} }
// Obtain a 32-bit random number // Obtain a 32-bit random number
uint32_t ExtractU32() uint32_t ExtractU32(void)
{ {
uint32_t y; uint32_t y;
int i = index; int i = index;

2
prng.h
View File

@@ -5,5 +5,5 @@
#include <stdint.h> #include <stdint.h>
void InitializePRNG(const uint32_t seed); void InitializePRNG(const uint32_t seed);
uint32_t ExtractU32(); uint32_t ExtractU32(void);
int getrandom(int low, int high); int getrandom(int low, int high);