Added support for quitting without ^C, and outputting to file
This commit is contained in:
parent
6d879da5fa
commit
d0c257b310
5 changed files with 68 additions and 23 deletions
9
types.h
9
types.h
|
|
@ -2,22 +2,27 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
#include "config.h"
|
||||
|
||||
// Only use big ints on architectures where it doesn't impact speed
|
||||
#if INT_FAST16_MAX == INT_FAST64_MAX
|
||||
typedef int rowsint_t;
|
||||
typedef int columnsint_t;
|
||||
typedef unsigned columnsint_t;
|
||||
#define QUITCOLUMN UINT_MAX
|
||||
typedef unsigned winint_t;
|
||||
typedef uintmax_t column_t;
|
||||
#else
|
||||
typedef int_fast8_t rowsint_t;
|
||||
typedef int_fast8_t columnsint_t;
|
||||
typedef uint_fast8_t columnsint_t;
|
||||
#define QUITCOLUMN UINT_FAST8_MAX
|
||||
typedef uint_fast8_t winint_t;
|
||||
typedef uint_fast8_t column_t;
|
||||
#endif
|
||||
|
||||
#define WININT_FORMAT "%3d"
|
||||
|
||||
|
||||
typedef struct {
|
||||
bool player;
|
||||
rowsint_t *height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue