/*------------------------------------------------------------------------------
Projekt: ICP - game Othello
Authors: Michal Schorm (xschor02)
Date: FIT VUTBR 2016                                                

File content: class Disk, enum DiskColor
-------------------------------------------------------------------------------*/

#include <iostream>  // cin, cout
using namespace std;



//! ENUM DiskColor - contains values for distinguish disk color and return values for other classes.
/*!
white, black are used as possible colors of the disk
none is used as return value (which color is disk on specified filed? -> none (means there is not any disk on that field) )
draw is used as return value (which color is winning? -> draw (means there are equal amounts of disks for both colors) )
*/
#ifndef DISK_TYPE
#define DISK_TYPE
enum DiskColor { none=0, white=1, black=2, draw=3 };
#endif



//!  Class Disk - represents disk that can be placed on filed in game.
/*!
Can be placed
Can be turned (to change its color)
*/
#ifndef DISK_CLASS_FULL
#define DISK_CLASS_FULL
class Disk
{
 private:
   //! only information needed - represents color of the disk
   DiskColor color;



 public:
   //! Constructor only assign color given to this disk
   Disk(DiskColor defaultColor)
     {
      this->color = defaultColor;
     }

   //! Swap color of the disk. Swaps between bllack and white from DiskColor enum.
   void turn()
     {
      if(this->color == white) this->color=black;
      else this->color = white;
     }

   //! Returns color of the disk
   DiskColor getColor()
     {
      return this->color;
     }
     
};

#endif