% An individual Hex tile. Contains coordinates, the number 
% of the player that occupies this Hex tile, and a handle to the
% patch graphic.
classdef Hex < handle
  properties
    % x-coordinate of the tile
    xcoord
    % y-coordinate of the tile
    ycoord
    % number of the player that occupies this tile, 
    %  0 if not occupied 
    player
    % handle to the patch graphic
    patchHandle = 0
  end
  methods
    % Creates a Hex from the give coordinates and player number.
    function hex = Hex(xcoord, ycoord, player)
    end
    
    % draw(Hex, Number, Color) -> handle
    %
    % Draws a six-sided patch using the given color, hex,
    %  and size of the side. Returns the graphics handle.
    %
    % calls: patch
    function handle = draw(hex, side, color)
    end
  
    % Returns true if the player number of the hex is zero
    function result = isEmpty(hex)
    end
    
    % setPlayer(Hex, Player) -> graphics
    % Sets the player number of the hex from the give player.
    % Also sets the 'FaceColor' property of the hex's patch handle
    %  to the player's color.
    function [] = setPlayer(hex, player)
    end
  end
end