$version='12.2'

$platform= ( case RUBY_PLATFORM 
when /mswin/
  'windows'
when /linux/
  'linux'
when /powerpc/
  'mac'
when /solaris/
  'sun'
else
  $stderr.puts "unknown platform: #{RUBY_PLATFORM}"
  nil
end )

unless $current_path
  $current_path= File.dirname(File.expand_path((__FILE__.gsub(/\\\\/,'/')) ))


  puts "rubygo path is  #$current_path"

  $LOAD_PATH.push $current_path

end


class << $current_path 
  def + (arg)
    File.join(self,arg)
  end
end


ENV['DISPLAY']=':0.0' unless ENV['DISPLAY']

require 'utils/gobug'
require 'tk'
$ip=TkCore::INTERP
=begin
class << $ip
def _eval(arg)
p arg
super(arg)
end
end
=end

require 'tkcanvas'
require 'tkafter'

require 'utils/tkballoons'
require 'utils/tkcb.rb'

require 'net/protocol.rb'

require 'utils/gowindow'
require 'utils/dialog'
require 'utils/texturedpane.rb'
require 'utils/igslist'
require 'utils/igsentry'
require 'utils/virtualtext'
require 'utils/help'
require 'utils/win32patch'
require 'utils/form'
require 'utils/misc'
require 'utils/diagramprinter'
require 'utils/browser'
require 'utils/checkbutton'
require 'utils/pnames'

require 'Defaults'
require 'TkDefaults'

require 'editor/gobasic'

require 'sgf/game'
require 'sgf/gogame'
require 'sgf/gowin'
require 'sgf/sgf'
require 'sgf/sgf_info'
require 'sgf/goreplay'
require 'sgf/goprobs'
require 'sgf/playerinfo'
require 'sgf/gamedisplay'
require 'sgf/property'

require 'editor/grid'
require 'editor/toolbox'
require 'editor/tools'
require 'editor/goban'
require 'editor/gobansc'
require 'editor/gosetup'
require 'editor/goeditor'
require 'editor/goscore'



require 'client/igscp'
require 'client/igsprotocol'
require 'client/igsobserver'
require 'client/goobserver'
require 'client/goplayer'
require 'client/goteacher'
require 'client/playerslist'
require 'client/playerentry'
require 'client/goclient'
require 'client/gameentry'
require 'client/gameslist'
require 'client/igsclient'
require 'client/gomatch'
require 'client/chatobserver'
require 'client/console'
require 'client/gamesobserver'
require 'client/games'
require 'client/players'
require 'client/stats'
require 'client/statobserver'
require 'client/reviewprotocol'
require 'client/reviewobserver'
require 'client/reviewer'
#require 'client/reviews'
require 'client/wlist'

require 'gnugo/gg'

require "web/JFhtml"
require "web/JFurl"
require 'web/JFhttp'
require 'English'

=begin
=end

# instances variables are go.rb
@show_balloons=Defaults.get_default_value('show_help_balloons')
TkWindow.show_balloons= (@show_balloons.value == '0' ? false : true)
@play_sounds=Defaults.get_default_value('play_sounds')
open_sound if @play_sounds.value == '1'


PNames.init($current_path+'../players_list')

