sudoku_bat/solver/tile.c

16 lines
303 B
C
Raw Permalink Normal View History

2024-05-25 23:08:47 +00:00
#include <stdio.h>
#include "tile.h"
#include "shared.h"
tile_t tile_new(char c) {
tile_t tile;
tile.value = 0;
if (c == '.' || (c >= '1' && c <= '9')) {
tile.value = c;
return tile;
}
printf("tile value: %d", c);
crash("invalid tile value");
return tile;
}