Skip to content

Commit

Permalink
Eagerness improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
berk76 committed Apr 21, 2016
1 parent 27accd6 commit cf70563
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions piskworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string.h>
#include <time.h>

#define VERSION "0.4.1"
#define VERSION "0.4.2"
#define GRID_OFFSET 2
#define get_random_priority() (rand() % 10)

Expand Down Expand Up @@ -111,8 +111,7 @@ int main(int argc, char **argv) {
printf("*******************\n\n");
do {
setup_preferences();
eagerness = (rand() % 5) - 2;
printf("eagerness=%d", eagerness);
eagerness = ((rand() % 3) - 1) * 2;

clear_grid();
if (computer_starts_game) {
Expand Down Expand Up @@ -146,7 +145,7 @@ int main(int argc, char **argv) {
score_player++;
printf("You are winner\n");
}
printf("(difficulty=%d, %s started)\n", difficulty, (computer_starts_game) ? "computer" : "you");
printf("(d=%d, e=%d, %s started)\n", difficulty, eagerness, (computer_starts_game) ? "computer" : "you");

printf("Computer:You %d:%d\n", score_computer, score_player);
c = get_option("\nAnother game? (y/n)", "YyNn");
Expand Down

0 comments on commit cf70563

Please sign in to comment.