ftp.nice.ch/pub/next/games/strategic/NPipe.s.tar.gz#/NPipe/NCommon.h

This is NCommon.h in view mode; [Download] [Up]

#define UNUSED_PIECE_PENALTY_POINTS     10
#define BIDIRECTIONAL_PIECE_POINTS      20
#define UNIDIRECTIONAL_PIECE_POINTS     30
#define INTERSECTION_BONUS_POINTS       40


typedef enum
{
   INVALID_DIR = -1,
   EAST = 0,
   NORTH,
   WEST,
   SOUTH
} Direction_t;


typedef enum
{
   INVALID_ROT = -1,
   CLOCKWISE = 0,
   COUNTERCLOCKWISE
} Rotation_t;

typedef enum
{
   STARTED = 0,
   PAUSED,
   STOPPED,
   FASTFORWARD
} GameStatus_t;

typedef enum
{
   PIPE_OBSTACLE = 0,
   PIPE_UNASSIGNED,
   PIPE_SOURCE,
   PIPE_VERTICAL_BIDIRECTIONAL,
   PIPE_HORIZONTAL_BIDIRECTIONAL,
   PIPE_UPPER_LEFT,
   PIPE_UPPER_RIGHT,
   PIPE_LOWER_LEFT,
   PIPE_LOWER_RIGHT,
   PIPE_INTERSECTION,
   PIPE_VERTICAL_ONEWAY_UP,
   PIPE_VERTICAL_ONEWAY_DOWN,
   PIPE_HORIZONTAL_ONEWAY_LEFT,
   PIPE_HORIZONTAL_ONEWAY_RIGHT
} NPipe_t;

#define MINIMUM_PIPE_SET ( PIPE_INTERSECTION - PIPE_VERTICAL_BIDIRECTIONAL + 1 )
#define MAXIMUM_PIPE_SET ( PIPE_HORIZONTAL_ONEWAY_RIGHT - PIPE_VERTICAL_BIDIRECTIONAL + 1 ) 

#define STRING_LENGTH 255

extern Rotation_t direction2rotation( NPipe_t pipe, Direction_t entry);
extern Direction_t entry2exit( NPipe_t pipe, Direction_t entry);
extern Direction_t exit2entry( Direction_t entry);

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.