-
Notifications
You must be signed in to change notification settings - Fork 0
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
ed3a296
commit 72bc9b9
Showing
8 changed files
with
98 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Created by Michael Bui on 12/2/24. | ||
// | ||
|
||
#ifndef BLOCK_H | ||
#define BLOCK_H | ||
|
||
#pragma once | ||
#include <vector> | ||
#include <map> | ||
#include "position.h" | ||
|
||
class Block { | ||
public: | ||
Block(); | ||
int id; | ||
std::map<int, std::vector<Position>> cells; | ||
private: | ||
int cellSize; | ||
int roationState; | ||
}; | ||
|
||
#endif //BLOCK_H |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Created by Michael Bui on 12/2/24. | ||
// | ||
|
||
#include "colors.h" | ||
|
||
#include <vector> | ||
|
||
const Color darkGray = {26, 31, 40, 255}; | ||
const Color green = {47, 230, 23, 255}; | ||
const Color red = {232, 18, 18, 255}; | ||
const Color orange = {226, 116, 17, 255}; | ||
const Color yellow = {237, 234, 4, 255}; | ||
const Color purple = {166, 0, 247, 255}; | ||
const Color cyan = {21, 204, 209, 255}; | ||
const Color blue = {13, 64, 216, 255}; | ||
|
||
std::vector<Color> GetCellColors() { | ||
return {darkGray, green, red, orange, yellow, purple, cyan, blue}; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Created by Michael Bui on 12/2/24. | ||
// | ||
|
||
#ifndef COLOURS_H | ||
#define COLOURS_H | ||
|
||
#pragma once | ||
#include <raylib.h> | ||
#include <vector> | ||
|
||
extern const Color darkGray; | ||
extern const Color green; | ||
extern const Color red; | ||
extern const Color orange; | ||
extern const Color yellow; | ||
extern const Color purple; | ||
extern const Color cyan; | ||
extern const Color blue; | ||
|
||
std::vector<Color> GetCellColors(); | ||
|
||
#endif //COLOURS_H |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Created by Michael Bui on 12/2/24. | ||
// | ||
|
||
#include "position.h" | ||
|
||
Position::Position(int row, int column) { | ||
this -> row = row; | ||
this -> column = column; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Created by Michael Bui on 12/2/24. | ||
// | ||
|
||
#ifndef POSITION_H | ||
#define POSITION_H | ||
|
||
#pragma once | ||
class Position { | ||
public: | ||
Position(int row, int column); | ||
int row; | ||
int column; | ||
}; | ||
|
||
#endif //POSITION_H |