Pervasive Displays Library Suite - Basic edition 8.0.8
Library for Pervasive Displays e-paper screens and EXT3 extension board
|
Example of features for basic edition. More...
Data Structures | |
struct | coordinates_s |
Macros | |
#define | PLAYER_NONE 0 |
#define | PLAYER_HUMAN 1 |
#define | PLAYER_MCU 2 |
#define | NUMBER 4 |
Functions | |
bool | checkWinnerPlayer (uint8_t player) |
Check whether palyer is winner. | |
void | drawWinnerPlayer (uint8_t player) |
Draw winning line, column or diagonal. | |
uint8_t | checkWinner () |
Check the winner. | |
void | drawMovePlayer (coordinates_s coordinates, uint8_t player) |
Display the move of player. | |
void | moveMCU () |
Let the MCU play. | |
bool | checkHuman (coordinates_s &coordinates) |
Check human play. | |
void | printBoard () |
Print board on serial. | |
void | playGame () |
Play the game. | |
void | moveHuman () |
Let the human play. | |
void | resetGame () |
Reset the game. | |
void | drawStartScreen () |
Draw start screen. | |
void | drawGameScreen () |
Draw empty board. | |
void | drawGameOverScreen () |
Draw end of game. | |
uint8_t | getBoard (coordinates_s coordinates) |
Get board cell content. | |
bool | setBoard (coordinates_s coordinates, uint8_t player) |
Set board cell content to player. | |
void | displayCenteredText (uint16_t x0, uint16_t y0, String text, uint16_t colour) |
Display text centered on coordinates. | |
void | setup () |
Setup. | |
void | loop () |
Loop, empty. | |
Variables | |
Screen_EPD_EXT3_Fast | myScreen (eScreen_EPD_370_PS_0C_Touch, boardRaspberryPiPico_RP2040) |
uint16_t | x |
uint16_t | y |
uint16_t | dx |
uint16_t | dy |
coordinates_s | coordinates |
uint16_t | tx |
uint16_t | ty |
uint16_t | tz |
uint16_t | tt |
uint16_t | colourHuman |
uint16_t | colourMCU |
uint16_t | colourGrid |
uint16_t | colourBackground |
uint16_t | colourMessage |
uint8_t | fsmScreen = 1 |
uint8_t | moves = 1 |
uint8_t | winner = 0 |
uint8_t | board [4][4] |
uint16_t | minX |
uint16_t | maxX |
uint16_t | minY |
uint16_t | maxY |
uint16_t | sizeTable |
uint16_t | sizeCell |
Example of features for basic edition.
Library for Pervasive Displays EXT3 - Basic level
bool checkHuman | ( | coordinates_s & | coordinates | ) |
Check human play.
coordinates | coordinates of the cell to block |
uint8_t checkWinner | ( | ) |
Check the winner.
bool checkWinnerPlayer | ( | uint8_t | player | ) |
Check whether palyer is winner.
player | player number |
void displayCenteredText | ( | uint16_t | x0, |
uint16_t | y0, | ||
String | text, | ||
uint16_t | colour ) |
Display text centered on coordinates.
x0 | x coordinate |
y0 | y coordinate |
text | text |
colour | colour |
void drawMovePlayer | ( | coordinates_s | coordinates, |
uint8_t | player ) |
Display the move of player.
coordinates | move coordinates |
player | player number |
void drawWinnerPlayer | ( | uint8_t | player | ) |
Draw winning line, column or diagonal.
player | player number |
uint8_t getBoard | ( | coordinates_s | coordinates | ) |
Get board cell content.
coordinates | coordinates i j of cell |
bool setBoard | ( | coordinates_s | coordinates, |
uint8_t | player ) |
Set board cell content to player.
coordinates | coordinates i j of cell |
player | player number |