-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f7c254
commit 5c6ea6a
Showing
70 changed files
with
483,992 additions
and
454,350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
/********************************** (C) COPYRIGHT ******************************* | ||
* File Name : snake.h | ||
* Author : ChnMasterOG | ||
* Version : V1.0 | ||
* Date : 2022/1/28 | ||
* Description : 应用层 - 贪吃蛇游戏头文件 | ||
* Copyright (c) 2023 ChnMasterOG | ||
* SPDX-License-Identifier: GPL-3.0 | ||
*******************************************************************************/ | ||
|
||
#ifndef SNAKE_H | ||
#define SNAKE_H | ||
|
||
#define MAX_SNAKE_LENGTH 30 // 最长蛇长 | ||
|
||
typedef enum { | ||
DirUp = 1, | ||
DirDown, | ||
DirLeft, | ||
DirRight, | ||
}SnakeDir; | ||
|
||
typedef struct { | ||
uint8_t PosX; | ||
uint8_t PosY; | ||
}SnakePos; | ||
|
||
extern uint8_t BodyDir[MAX_SNAKE_LENGTH]; | ||
|
||
void Snake_Init( void ); | ||
void MoveSnake( void ); | ||
|
||
#endif | ||
|
||
/********************************** (C) COPYRIGHT ******************************* | ||
* File Name : snake.h | ||
* Author : ChnMasterOG | ||
* Version : V1.0 | ||
* Date : 2022/1/28 | ||
* Description : 应用层 - 贪吃蛇游戏头文件 | ||
* Copyright (c) 2023 ChnMasterOG | ||
* SPDX-License-Identifier: GPL-3.0 | ||
*******************************************************************************/ | ||
|
||
#ifndef SNAKE_H | ||
#define SNAKE_H | ||
|
||
#define MAX_SNAKE_LENGTH 10 // 最长蛇长 | ||
|
||
typedef enum { | ||
DirUp = 1, | ||
DirDown, | ||
DirLeft, | ||
DirRight, | ||
}SnakeDir; | ||
|
||
typedef struct { | ||
uint8_t PosX; | ||
uint8_t PosY; | ||
}SnakePos; | ||
|
||
extern uint8_t BodyDir[MAX_SNAKE_LENGTH]; | ||
|
||
void Snake_Init( void ); | ||
void MoveSnake( void ); | ||
|
||
#endif | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.