#pragma once

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>

#include "../vsgl3/LiteMath.h"
#include "../vsgl3/Timer.h"

enum MOVE_FLAGS {
  TURN_LEFT      = 1,
  TURN_RIGHT     = 2,
  MOVE_FORWARD   = 4,
  MOVE_BACK      = 8
};

class IGraphicsObject
{
public:

  virtual void draw(float4x4 worldViewMatrix, float4x4 projectionMatrix) const = 0;
  
  virtual void translate(float3 a_pos) = 0; // from (0,0,0) to world pos
  virtual void rotateY(float angle)    = 0; // from default to world pos orientation

  virtual void animateStart(int a_flags, float a_timeStart) { } // 

};

IGraphicsObject* CreateMazeGraphics(float a_halfSize, float a_texMult);


class IGameObject // the things that can be placed in cells of maze
{
public:

  IGameObject() : posX(0), posY(0), posZ(0), dirX(0), dirY(1) {}

  int posX; // posX on Maze2D
  int posY; // posY on Maze2D
  int posZ; //

  int dirX;
  int dirY;

  virtual std::vector<IGraphicsObject*> getDrawList() { return std::vector<IGraphicsObject*>(); }
  virtual void move(int a_flags, int a_cells) = 0;
};


const float ANIMATE_INTERVAL_IN_SEC = 0.25f;

