~drbob/+junk/hitori-main

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Philip Withnall
  • Date: 2008-04-20 14:01:23 UTC
  • Revision ID: philip@tecnocode.co.uk-20080420140123-3m8fx4ec48vlxmxz
Fixed some memory leaks.
Fixed the rule 3 check so that it takes painted cells into account correctly.
Added a few bits of code documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <stdlib.h>
27
27
#include <gtk/gtk.h>
28
28
#include <glib/gi18n.h>
 
29
#include <glib/gprintf.h>
29
30
 
30
31
#include "main.h"
31
32
#include "interface.h"
99
100
                for (y = 0; y < BOARD_SIZE; y++) {
100
101
                        for (x = 0; x < BOARD_SIZE; x++) {
101
102
                                if (hitori->board[x][y].painted == FALSE)
102
 
                                        printf ("%u ", hitori->board[x][y].num);
 
103
                                        g_printf ("%u ", hitori->board[x][y].num);
103
104
                                else
104
 
                                        printf ("X ");
 
105
                                        g_printf ("X ");
105
106
                        }
106
 
                        printf ("\n");
 
107
                        g_printf ("\n");
107
108
                }
108
109
        }
109
110
}