Snapple
Memuat...
Mencari...
Tidak Ditemukan
Referensi File scene_game.hpp
#include "../prelude.hpp"
#include "../backend/components.hpp"
#include "../cfg.hpp"
#include <cstdint>
#include <optional>

Ke kode sumber file ini.

Kelas

struct  TileCoord
class  AppleExplosion
class  PlayerStats
struct  MathQuestion
class  MathQuestionDisplay
class  StatusBar
class  Player
class  GameScene

Makro Definisi

#define LIVES   3
#define SNAKE_INITIAL_LENGTH   50 - 1
#define SNAKE_UNIT_LENGTH   5
#define TILE_ROWS   17
#define TILE_COLUMNS   32
#define TILE_DIMENSION   60

Enumerasi

enum  Direction { UP , DOWN , LEFT , RIGHT }
enum  Difficulty {
  ADD_SUB_EASY , ADD_SUB_HARD , MULT_DIV_EASY , MULT_DIV_HARD ,
  POW_SQRT_EASY , POW_SQRT_HARD
}
enum  Food { BAD_APPLE , APPLE , APPLE_PIE , GOLDEN_APPLE_PIE }
enum  GameOver { FALSE , CRASH_WALL , CRASH_SELF , BAD_FOOD }
enum  MathDisplayStatus { QUESTION , FEEDBACK }

Fungsi

Food get_food (Difficulty difficulty)
long long get_pts (Food food)

Dokumentasi Makro Definisi

◆ LIVES

#define LIVES   3

◆ SNAKE_INITIAL_LENGTH

#define SNAKE_INITIAL_LENGTH   50 - 1

◆ SNAKE_UNIT_LENGTH

#define SNAKE_UNIT_LENGTH   5

◆ TILE_COLUMNS

#define TILE_COLUMNS   32

◆ TILE_DIMENSION

#define TILE_DIMENSION   60

◆ TILE_ROWS

#define TILE_ROWS   17

Dokumentasi Tipe Enumerasi

◆ Difficulty

enum Difficulty
Nilai enumerasi
ADD_SUB_EASY 
ADD_SUB_HARD 
MULT_DIV_EASY 
MULT_DIV_HARD 
POW_SQRT_EASY 
POW_SQRT_HARD 

◆ Direction

enum Direction
Nilai enumerasi
UP 
DOWN 
LEFT 
RIGHT 

◆ Food

enum Food
Nilai enumerasi
BAD_APPLE 
APPLE 
APPLE_PIE 
GOLDEN_APPLE_PIE 

◆ GameOver

enum GameOver
Nilai enumerasi
FALSE 
CRASH_WALL 
CRASH_SELF 
BAD_FOOD 

◆ MathDisplayStatus

Nilai enumerasi
QUESTION 
FEEDBACK 

Dokumentasi Fungsi

◆ get_food()

Food get_food ( Difficulty difficulty)

◆ get_pts()

long long get_pts ( Food food)