Play snake using mbed! A snake-like game that runs on the memoryLCD display on Happy Gecko.

Dependencies:   mbed MemoryLCD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers settings.h Source File

settings.h

Go to the documentation of this file.
00001 /***************************************************************************//**
00002  * @file settings.h
00003  * @settings file for Hungry Gecko program
00004  ******************************************************************************/
00005 #ifndef SETTINGS_H_
00006 #define SETTINGS_H_
00007 #include "LCDSettings.h"
00008 
00009 #define MAXLENGTH 255
00010 #define STEPSIZE 7
00011 
00012 /*  Define board limits, note that the display height and display width is 128
00013  * This particlular choice leads to 255 STEPSIZE x STEPSIZE tiles. Thus,
00014  * the tile number can be stored in 1 uint8_t
00015  * */
00016 #define TOPEDGE 2
00017 #define BOARD_HEIGHT 15
00018 #define BOARD_WIDTH 17
00019 #define BOARDERWIDTH (DISPLAY_WIDTH - STEPSIZE*BOARD_WIDTH)
00020 
00021 /* Define allowed direction to move */
00022 typedef enum{
00023     LEFT=0, RIGHT, UP, DOWN
00024 } Direction;
00025 
00026 #endif /* SETTINGS_H_ */
00027