/* Blinker
Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
a blinkenarea.org project */
#ifndef BLINKER_TETRIS_H
#define BLINKER_TETRIS_H
#include <string>
#include <vector>
#include <BlinkenLib/BlinkenFrame.h>
#include "Color.h"
#include "ColorFile.h"
#include "File.h"
#include "Format.h"
#include "FormatFile.h"
#include "Game.h"
#include "Mgrs.h"
#include "Module.h"
#include "NameFile.h"
#include "OpConn.h"
#include "OpConnIf.h"
#include "OpReqIf.h"
#include "OutStreamFile.h"
#include "Time.h"
#include "TimeCallee.h"
#include "UIntFile.h"
namespace Blinker {
/// tetris game
class Tetris: public Game, public OpReqIf
{
protected:
/// coordinates of a pixel part of a stone
struct Coord {
int x;
int y;
};
/// descriptor of a certain rotation of a stone
struct RotStone {
Coord pixels[4]; ///< coordinates of the 4 pixels
};
/// descriptor of a stone
struct Stone {
RotStone rot[4]; ///< rotations of the stone
};