class GamePolicy
  attr_reader :current_user, :model

  def initialize(current_user, model)
    @current_user = current_user || User.new
    @game = model
  end

  def index?
    @current_user.admin?
  end

  def show?
    @current_user.admin? || @current_user == @user
  end

  def update?
    @current_user.admin? # TODO: Allow game owner to edit || @game.owner == @current_user
  end

  def destroy?
    return false if @current_user == @user
    @current_user.admin?
  end
end
