//
//  Piece.h
//  prog2
//
//  Created by Neil Killeen on 5/9/13.
//  Copyright (c) 2013 Neil Killeen. All rights reserved.
//

#ifndef __prog2__Piece__
#define __prog2__Piece__

#include <iostream>
#include "Angel.h"
#include "Mesh.h"
#include "Grid.h"

using namespace Angel;
using std::vector;

enum PieceType {
    PIECE_I,
    PIECE_L,
    PIECE_O,
    PIECE_S,
    PIECE_T
};

class Piece {
//    Mesh* mesh;
    Grid* grid;
    vector<point3> localcoords;
    point3 current_pos;
    color4 color;
    float piece_speed;
    
public:
    Piece(PieceType type, Grid* curr_grid);
    void Rotate(GLfloat x, GLfloat y, GLfloat z);
    bool Translate(GLfloat x, GLfloat y, GLfloat z);
    bool Step() { return Translate(0,-1,0); }
    
//    int getPieceStep() const { return piece_step; }
//    void setPieceStep(const int& that) { piece_step = that; }
    float getPieceSpeed() const { return piece_speed; }
    void setPieceSpeed(const float& that) { piece_speed = that; }
};

#endif /* defined(__prog2__Piece__) */
