Check-in [f1abf65d52]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:game.jl
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f1abf65d521e2d0fa31c1547d57ef8e6427f2a4b
User & Date: hhammadu 2016-11-29 01:29:23
Context
2016-11-29
04:19
infrastructure of game check-in: 914c78945f user: hhammadu tags: trunk
01:29
game.jl check-in: f1abf65d52 user: hhammadu tags: trunk
2016-11-28
23:45
changed databases for keeping track of buttons clicked check-in: ab64875b14 user: hhammadu tags: trunk
Changes

Changes to databases.jl.

    15     15   export getScore
    16     16   export updateScore
    17     17   export update_time
    18     18   export get_time
    19     19   export timed
    20     20   export get_optval
    21     21   export updategame
           22  +export update_gameval
    22     23   #Create Tables
    23     24   ########################################################################################################################################################################################
    24     25   
    25     26   function Create_Table(db,name)
    26     27   	SQLite.drop!(db, name; ifexists = true)
    27     28   	if name == "meta"
    28     29   		query="CREATE TABLE meta(key TEXT, value TEXT);"
................................................................................
   121    122   	
   122    123   	query = "SELECT value FROM meta WHERE key = '$name';"
   123    124   	x = SQLite.query(db,query)
   124    125   	y1=parse(get(x[1][1]))
   125    126   	return y1
   126    127   end
   127    128   
          129  +function update_gameval(db,name)
          130  +	stmt=SQLite.Stmt(db,"UPDATE game SET value = 1 WHERE option = '$name';")
          131  +	SQLite.execute!(stmt)
          132  +end
   128    133   function get_optval(db,opt)
   129    134   	query = "SELECT value FROM game WHERE option = '$opt';"
   130    135   	x = SQLite.query(db,query)
   131    136   	y = (get(x[1][1]))
   132    137   	return y
   133    138   end
   134    139   function updateMeta(db,shogiType,cheating,timed,sente_time,gote_time)

Added game.jl.

            1  +module GUIstart
            2  +push!(LOAD_PATH,pwd())	
            3  +export buttons
            4  +using SQLite
            5  +using databases
            6  +db = SQLite.DB("database.db")
            7  +	using Gtk
            8  +	using Gtk.ShortNames
            9  +	Create_Table(db,"game")
           10  +	export buttons
           11  +	
           12  +
           13  +    
           14  +	Z = ["start","continue","replay","AI","human","join","host_AI","host_human","host_email","e_turn","local","minishoghi","stshoghi","chshoghi","jrmode","normal","hard","suicidal",
           15  +	"protecteddeath","randomAI","timed","cheat","firstturn"]
           16  +	for i in Z
           17  +		updategame(db,i,0)
           18  +	end
           19  +
           20  +	function buttons()
           21  +		win = @Window("START") |> (f = @Frame("SHOGI"))
           22  +		StartGamebutton = @Button("Start Game Now")
           23  +		hbox = @Box(:v)  
           24  +		push!(f, hbox)
           25  +		start = @Button("Start")
           26  +		Continue = @Button("Continue")
           27  +		replay = @Button("Replay")
           28  +		Quit = @Button("Quit")
           29  +		push!(hbox,start )
           30  +		push!(hbox, replay)
           31  +		push!(hbox, Continue)
           32  +		push!(hbox, Quit)
           33  +		
           34  +	
           35  +	
           36  +	
           37  +	
           38  +		id1 = signal_connect(start, "clicked") do widget
           39  +			update_gameval(db,"start")
           40  +			destroy(hbox)
           41  +			hbox2 = @Box(:v) 
           42  +			push!(f, hbox2)
           43  +			AI = @Button("Start Against AI")
           44  +			Human = @Button("Start against Human")
           45  +			Join = @Button("Join a game against a remote program")
           46  +			Host_AI = @Button("Host a game, using your AI as the player")
           47  +			Host_Human = @Button(" Host a game, with a human as the player")
           48  +			Host_Email = @Button("Start a new game over email.")
           49  +			
           50  +			
           51  +			push!(hbox2, AI)
           52  +			push!(hbox2, Human)
           53  +			push!(hbox2, Join)
           54  +			push!(hbox2, Host_AI)
           55  +			push!(hbox2, Host_Human)
           56  +			push!(hbox2, Host_Email)
           57  +			
           58  +			showall(win)
           59  +		
           60  +			ida = signal_connect(AI, "clicked") do widget
           61  +		   
           62  +				update_gameval(db,"AI")
           63  +				destroy(f)
           64  +				g = @Grid()  
           65  +				MiniShogi = @CheckButton("MiniShogi")
           66  +				ChShogi = @CheckButton("Chu Shogi")
           67  +				StShogi = @CheckButton("Standard Shogi")
           68  +				TShogi = @CheckButton("Tenjiku shogi")
           69  +				g[1:5,1] = @Button("Game Type")
           70  +				g[1,2] = MiniShogi  
           71  +				g[2,2] = ChShogi
           72  +				g[3,2] = StShogi
           73  +				
           74  +				id1 = signal_connect(MiniShogi, "toggled") do widget
           75  +					update_gameval(db,"minishoghi")
           76  +				end
           77  +				
           78  +				id2 = signal_connect(StShogi, "toggled") do widget
           79  +					update_gameval(db,"stshoghi")
           80  +				end
           81  +			
           82  +				id3 = signal_connect(ChShogi, "toggled") do widget
           83  +					update_gameval(db,"chshoghi")
           84  +				end
           85  +			
           86  +				g[1:5,4] = @Button("Mode")
           87  +				JRmode = @CheckButton("Japanese roulette mode")
           88  +				g[1:5,5] = JRmode
           89  +			
           90  +				id4 = signal_connect(JRmode, "toggled") do widget
           91  +					update_gameval(db,"jrmode")
           92  +				end
           93  +				
           94  +				g[1:5,7] = @Button("Difficulty")
           95  +				Normal = @CheckButton("Normal")
           96  +				Hard = @CheckButton("Hard")
           97  +				Suicidal = @CheckButton("Suicidal")
           98  +				ProtectedDeath = @CheckButton("ProtectedDeath")
           99  +				RandomAI = @CheckButton("RandomAI")
          100  +				g[1,8] = Normal
          101  +				g[2,8] = Hard
          102  +				g[3,8] = Suicidal
          103  +				g[4,8] = ProtectedDeath
          104  +				g[5,8] = RandomAI
          105  +			
          106  +				idn = signal_connect(Normal, "toggled") do widget
          107  +					update_gameval(db,"normal")
          108  +					
          109  +				end
          110  +			
          111  +				id2 = signal_connect(Hard, "toggled") do widget
          112  +						update_gameval(db,"hard")
          113  +				end
          114  +			
          115  +				ids = signal_connect(Suicidal, "toggled") do widget
          116  +					update_gameval(db,"suicidal")
          117  +				end
          118  +			
          119  +				idp = signal_connect(ProtectedDeath, "toggled") do widget
          120  +					update_gameval(db,"protecteddeath")
          121  +				end
          122  +			
          123  +				id5 = signal_connect(RandomAI, "toggled") do widget
          124  +					update_gameval(db,"randomAI")
          125  +				end
          126  +
          127  +				g[1:5,10] = @Button("Time Limit")
          128  +				Timed = @CheckButton("Timed")
          129  +				g[1,11] = Timed
          130  +			
          131  +				id6 = signal_connect(Timed, "toggled") do widget
          132  +					update_gameval(db,"timed")
          133  +				end
          134  +			
          135  +			
          136  +				g[1:5,13] = @Button("Cheating AI")
          137  +				Cheat = @CheckButton("cheating")
          138  +				g[1,14] = Cheat
          139  +				id7 = signal_connect(Cheat, "toggled") do widget
          140  +					update_gameval(db,"cheat")
          141  +				end
          142  +
          143  +				
          144  +				g[1:5,15] = @Button("Turn")
          145  +				Turn = @CheckButton("Go First")
          146  +				g[1,16] = Turn
          147  +				idt = signal_connect(Turn, "toggled") do widget
          148  +					update_gameval(db,"firstturn")
          149  +				end
          150  +				StartGamebutton = @Button("Start Game Now")
          151  +				g[1:5,17] = StartGamebutton
          152  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          153  +					println("call the module start")
          154  +					destroy(win)
          155  +				end
          156  +				
          157  +				setproperty!(g, :row_spacing, 15)  # introduce a 15-pixel gap between columns
          158  +				setproperty!(g, :column_homogeneous, true) # setproperty!(g,:homogeoneous,true) for gtk2
          159  +				setproperty!(g, :column_spacing, 15)  # introduce a 15-pixel gap between columns
          160  +				push!(win, g)
          161  +				showall(win)
          162  +			end
          163  +
          164  +			idh = signal_connect(Human, "clicked") do widget
          165  +			
          166  +				update_gameval(db,"human")
          167  +				destroy(f)
          168  +				g = @Grid()   # gtk3-only 
          169  +				setproperty!(g, :row_spacing, 15)  # introduce a 15-pixel gap between columns
          170  +				setproperty!(g, :column_homogeneous, true) # setproperty!(g,:homogeoneous,true) for gtk2
          171  +				setproperty!(g, :column_spacing, 15)  # introduce a 15-pixel gap between columns
          172  +				push!(win, g)
          173  +				MiniShogi = @CheckButton("MiniShogi")
          174  +				ChShogi = @CheckButton("Chu Shogi")
          175  +				StShogi = @CheckButton("Standard Shogi")
          176  +				g[1:5,1] = @Button("Game Type")
          177  +				g[1,2] = MiniShogi    # Cartesian coordinates, g[x,y]
          178  +				g[2,2] = ChShogi
          179  +				g[3,2] = StShogi
          180  +					
          181  +				id1 = signal_connect(MiniShogi, "toggled") do widget
          182  +					update_gameval(db,"minishoghi")
          183  +				end
          184  +				
          185  +				id2 = signal_connect(ChShogi, "toggled") do widget
          186  +					update_gameval(db,"chshoghi")
          187  +					
          188  +				end
          189  +				
          190  +				id3 = signal_connect(StShogi, "toggled") do widget
          191  +					update_gameval(db,"stshoghi")
          192  +				end
          193  +				
          194  +				g[1:5,4] = @Button("Mode")
          195  +				JRmode = @CheckButton("Japanese roulette mode")
          196  +				g[1:5,5] = JRmode
          197  +				id5 = signal_connect(JRmode, "toggled") do widget
          198  +					update_gameval(db,"jrmode")
          199  +				end	
          200  +				
          201  +				g[1:5,7] = @Button("Time Limit")
          202  +				Timed = @CheckButton("Timed")
          203  +				g[1,8] = Timed
          204  +				
          205  +				id6 = signal_connect(Timed, "toggled") do widget
          206  +					update_gameval(db,"timed")
          207  +				end
          208  +				
          209  +				g[1:5,15] = @Button("Turn")
          210  +				Turn = @CheckButton("Go First")
          211  +				g[1,16] = Turn
          212  +				
          213  +				id22 = signal_connect(Turn, "toggled") do widget
          214  +					update_gameval(db,"firstturn")
          215  +				end
          216  +				
          217  +				StartGamebutton = @Button("Start Game Now")
          218  +				g[1:5,17] = StartGamebutton
          219  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          220  +					println("call the module start")
          221  +					destroy(win)
          222  +				end
          223  +				showall(win)
          224  +			end
          225  +
          226  +			idJ = signal_connect(Join, "clicked") do widget
          227  +				update_gameval(db,"join")
          228  +				destroy(f)
          229  +				g = @Grid()   # gtk3-only 
          230  +				setproperty!(g, :row_spacing, 15)  # introduce a 15-pixel gap between columns
          231  +				setproperty!(g, :column_homogeneous, true) # setproperty!(g,:homogeoneous,true) for gtk2
          232  +				setproperty!(g, :column_spacing, 15)  # introduce a 15-pixel gap between columns
          233  +				push!(win, g)
          234  +				MiniShogi = @CheckButton("MiniShogi")
          235  +				ChShogi = @CheckButton("Chu Shogi")
          236  +				StShogi = @CheckButton("Standard Shogi")
          237  +				g[1:5,1] = @Button("Game Type")
          238  +				g[1,2] = MiniShogi    # Cartesian coordinates, g[x,y]
          239  +				g[2,2] = ChShogi
          240  +				g[3,2] = StShogi
          241  +					
          242  +				id1 = signal_connect(MiniShogi, "toggled") do widget
          243  +					update_gameval(db,"minishoghi")
          244  +				end
          245  +				
          246  +				id2 = signal_connect(ChShogi, "toggled") do widget
          247  +					update_gameval(db,"chshoghi")
          248  +					
          249  +				end
          250  +				
          251  +				id3 = signal_connect(StShogi, "toggled") do widget
          252  +					update_gameval(db,"stshoghi")
          253  +				end
          254  +				
          255  +				g[1:5,4] = @Button("Mode")
          256  +				JRmode = @CheckButton("Japanese roulette mode")
          257  +				g[1:5,5] = JRmode
          258  +				id5 = signal_connect(JRmode, "toggled") do widget
          259  +					update_gameval(db,"jrmode")
          260  +				end	
          261  +				
          262  +				g[1:5,7] = @Button("Time Limit")
          263  +				Timed = @CheckButton("Timed")
          264  +				g[1,8] = Timed
          265  +				
          266  +				id6 = signal_connect(Timed, "toggled") do widget
          267  +					update_gameval(db,"timed")
          268  +				end
          269  +				
          270  +				g[1:5,15] = @Button("Turn")
          271  +				Turn = @CheckButton("Go First")
          272  +				g[1,16] = Turn
          273  +				
          274  +				id22 = signal_connect(Turn, "toggled") do widget
          275  +					update_gameval(db,"firstturn")
          276  +				end
          277  +				
          278  +				StartGamebutton = @Button("Start Game Now")
          279  +				g[1:5,17] = StartGamebutton
          280  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          281  +					println("call the module start")
          282  +					destroy(win)
          283  +				end
          284  +				showall(win)
          285  +				
          286  +			end
          287  +		
          288  +			idha = signal_connect(Host_AI, "clicked") do widget
          289  +				update_gameval(db,"host_AI")
          290  +				destroy(f)
          291  +				g = @Grid()  
          292  +				MiniShogi = @CheckButton("MiniShogi")
          293  +				ChShogi = @CheckButton("Chu Shogi")
          294  +				StShogi = @CheckButton("Standard Shogi")
          295  +				TShogi = @CheckButton("Tenjiku shogi")
          296  +				g[1:5,1] = @Button("Game Type")
          297  +				g[1,2] = MiniShogi  
          298  +				g[2,2] = ChShogi
          299  +				g[3,2] = StShogi
          300  +				
          301  +				id1 = signal_connect(MiniShogi, "toggled") do widget
          302  +					update_gameval(db,"minishoghi")
          303  +				end
          304  +				
          305  +				id2 = signal_connect(StShogi, "toggled") do widget
          306  +					update_gameval(db,"stshoghi")
          307  +				end
          308  +			
          309  +				id3 = signal_connect(ChShogi, "toggled") do widget
          310  +					update_gameval(db,"chshoghi")
          311  +				end
          312  +			
          313  +				g[1:5,4] = @Button("Mode")
          314  +				JRmode = @CheckButton("Japanese roulette mode")
          315  +				g[1:5,5] = JRmode
          316  +			
          317  +				id4 = signal_connect(JRmode, "toggled") do widget
          318  +					update_gameval(db,"jrmode")
          319  +				end
          320  +				
          321  +				g[1:5,7] = @Button("Difficulty")
          322  +				Normal = @CheckButton("Normal")
          323  +				Hard = @CheckButton("Hard")
          324  +				Suicidal = @CheckButton("Suicidal")
          325  +				ProtectedDeath = @CheckButton("ProtectedDeath")
          326  +				RandomAI = @CheckButton("RandomAI")
          327  +				g[1,8] = Normal
          328  +				g[2,8] = Hard
          329  +				g[3,8] = Suicidal
          330  +				g[4,8] = ProtectedDeath
          331  +				g[5,8] = RandomAI
          332  +			
          333  +				idn = signal_connect(Normal, "toggled") do widget
          334  +					update_gameval(db,"normal")
          335  +					
          336  +				end
          337  +			
          338  +				id2 = signal_connect(Hard, "toggled") do widget
          339  +						update_gameval(db,"hard")
          340  +				end
          341  +			
          342  +				ids = signal_connect(Suicidal, "toggled") do widget
          343  +					update_gameval(db,"suicidal")
          344  +				end
          345  +			
          346  +				idp = signal_connect(ProtectedDeath, "toggled") do widget
          347  +					update_gameval(db,"protecteddeath")
          348  +				end
          349  +			
          350  +				id5 = signal_connect(RandomAI, "toggled") do widget
          351  +					update_gameval(db,"randomAI")
          352  +				end
          353  +
          354  +				g[1:5,10] = @Button("Time Limit")
          355  +				Timed = @CheckButton("Timed")
          356  +				g[1,11] = Timed
          357  +			
          358  +				id6 = signal_connect(Timed, "toggled") do widget
          359  +					update_gameval(db,"timed")
          360  +				end
          361  +			
          362  +			
          363  +				g[1:5,13] = @Button("Cheating AI")
          364  +				Cheat = @CheckButton("cheating")
          365  +				g[1,14] = Cheat
          366  +				id7 = signal_connect(Cheat, "toggled") do widget
          367  +					update_gameval(db,"cheat")
          368  +				end
          369  +
          370  +				
          371  +				g[1:5,15] = @Button("Turn")
          372  +				Turn = @CheckButton("Go First")
          373  +				g[1,16] = Turn
          374  +				idt = signal_connect(Turn, "toggled") do widget
          375  +					update_gameval(db,"firstturn")
          376  +				end
          377  +				StartGamebutton = @Button("Start Game Now")
          378  +				g[1:5,17] = StartGamebutton
          379  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          380  +					println("call the module start")
          381  +					destroy(win)
          382  +				end
          383  +				
          384  +				setproperty!(g, :row_spacing, 15)  # introduce a 15-pixel gap between columns
          385  +				setproperty!(g, :column_homogeneous, true) # setproperty!(g,:homogeoneous,true) for gtk2
          386  +				setproperty!(g, :column_spacing, 15)  # introduce a 15-pixel gap between columns
          387  +				push!(win, g)
          388  +				showall(win)
          389  +			end
          390  +			
          391  +			id5 = signal_connect(Host_Human, "clicked") do widget
          392  +				update_gameval(db,"host_human")
          393  +				destroy(f)
          394  +				g = @Grid()   # gtk3-only 
          395  +				setproperty!(g, :row_spacing, 15)  # introduce a 15-pixel gap between columns
          396  +				setproperty!(g, :column_homogeneous, true) # setproperty!(g,:homogeoneous,true) for gtk2
          397  +				setproperty!(g, :column_spacing, 15)  # introduce a 15-pixel gap between columns
          398  +				push!(win, g)
          399  +				MiniShogi = @CheckButton("MiniShogi")
          400  +				ChShogi = @CheckButton("Chu Shogi")
          401  +				StShogi = @CheckButton("Standard Shogi")
          402  +				g[1:5,1] = @Button("Game Type")
          403  +				g[1,2] = MiniShogi    # Cartesian coordinates, g[x,y]
          404  +				g[2,2] = ChShogi
          405  +				g[3,2] = StShogi
          406  +					
          407  +				id1 = signal_connect(MiniShogi, "toggled") do widget
          408  +					update_gameval(db,"minishoghi")
          409  +				end
          410  +				
          411  +				id2 = signal_connect(ChShogi, "toggled") do widget
          412  +					update_gameval(db,"chshoghi")
          413  +					
          414  +				end
          415  +				
          416  +				id3 = signal_connect(StShogi, "toggled") do widget
          417  +					update_gameval(db,"stshoghi")
          418  +				end
          419  +				
          420  +				g[1:5,4] = @Button("Mode")
          421  +				JRmode = @CheckButton("Japanese roulette mode")
          422  +				g[1:5,5] = JRmode
          423  +				id5 = signal_connect(JRmode, "toggled") do widget
          424  +					update_gameval(db,"jrmode")
          425  +				end	
          426  +				
          427  +				g[1:5,7] = @Button("Time Limit")
          428  +				Timed = @CheckButton("Timed")
          429  +				g[1,8] = Timed
          430  +				
          431  +				id6 = signal_connect(Timed, "toggled") do widget
          432  +					update_gameval(db,"timed")
          433  +				end
          434  +				
          435  +				g[1:5,15] = @Button("Turn")
          436  +				Turn = @CheckButton("Go First")
          437  +				g[1,16] = Turn
          438  +				
          439  +				id22 = signal_connect(Turn, "toggled") do widget
          440  +					update_gameval(db,"firstturn")
          441  +				end
          442  +				
          443  +				StartGamebutton = @Button("Start Game Now")
          444  +				g[1:5,17] = StartGamebutton
          445  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          446  +					println("call the module start")
          447  +					destroy(win)
          448  +				end
          449  +				showall(win)
          450  +			end
          451  +
          452  +			id6 = signal_connect(Host_Email, "clicked") do widget
          453  +				update_gameval(db,"host_email")
          454  +				destroy(f)
          455  +				g = @Grid()   # gtk3-only 
          456  +				setproperty!(g, :row_spacing, 15)  # introduce a 15-pixel gap between columns
          457  +				setproperty!(g, :column_homogeneous, true) # setproperty!(g,:homogeoneous,true) for gtk2
          458  +				setproperty!(g, :column_spacing, 15)  # introduce a 15-pixel gap between columns
          459  +				push!(win, g)
          460  +				MiniShogi = @CheckButton("MiniShogi")
          461  +				ChShogi = @CheckButton("Chu Shogi")
          462  +				StShogi = @CheckButton("Standard Shogi")
          463  +				g[1:5,1] = @Button("Game Type")
          464  +				g[1,2] = MiniShogi    # Cartesian coordinates, g[x,y]
          465  +				g[2,2] = ChShogi
          466  +				g[3,2] = StShogi
          467  +					
          468  +				id1 = signal_connect(MiniShogi, "toggled") do widget
          469  +					update_gameval(db,"minishoghi")
          470  +				end
          471  +				
          472  +				id2 = signal_connect(ChShogi, "toggled") do widget
          473  +					update_gameval(db,"chshoghi")
          474  +					
          475  +				end
          476  +				
          477  +				id3 = signal_connect(StShogi, "toggled") do widget
          478  +					update_gameval(db,"stshoghi")
          479  +				end
          480  +				
          481  +				g[1:5,4] = @Button("Mode")
          482  +				JRmode = @CheckButton("Japanese roulette mode")
          483  +				g[1:5,5] = JRmode
          484  +				id5 = signal_connect(JRmode, "toggled") do widget
          485  +					update_gameval(db,"jrmode")
          486  +				end	
          487  +				
          488  +				g[1:5,7] = @Button("Time Limit")
          489  +				Timed = @CheckButton("Timed")
          490  +				g[1,8] = Timed
          491  +				
          492  +				id6 = signal_connect(Timed, "toggled") do widget
          493  +					update_gameval(db,"timed")
          494  +				end
          495  +				
          496  +				g[1:5,15] = @Button("Turn")
          497  +				Turn = @CheckButton("Go First")
          498  +				g[1,16] = Turn
          499  +				
          500  +				id22 = signal_connect(Turn, "toggled") do widget
          501  +					update_gameval(db,"firstturn")
          502  +				end
          503  +				
          504  +				StartGamebutton = @Button("Start Game Now")
          505  +				g[1:5,17] = StartGamebutton
          506  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          507  +					println("call the module start")
          508  +					destroy(win)
          509  +				end
          510  +				showall(win)
          511  +			end
          512  +		end
          513  +		
          514  +
          515  +		id2 = signal_connect(Continue, "clicked") do widget
          516  +			update_gameval(db,"continue")
          517  +			destroy(hbox)
          518  +			hbox2 = @Box(:v) 
          519  +			push!(f, hbox2)
          520  +			Local = @Button("Continue A Local Game")
          521  +			E_turn = @Button("Take a turn in an email game")
          522  +			
          523  +			id6 = signal_connect(E_turn, "clicked") do widget
          524  +				update_gameval(db,"e_turn")
          525  +				destroy(hbox2)
          526  +				hbox3 = @Box(:v) 
          527  +				push!(f, hbox3)
          528  +				StartGamebutton = @Button("Start Game Now")
          529  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          530  +					include("start.jl")
          531  +					destroy(win)
          532  +				end
          533  +				push!(hbox3,StartGamebutton)
          534  +				showall(win)
          535  +			end
          536  +			id7 = signal_connect(Local, "clicked") do widget
          537  +				global Local11 = true
          538  +				destroy(hbox2)
          539  +				hbox3 = @Box(:v) 
          540  +				push!(f, hbox3)
          541  +				StartGamebutton = @Button("Start Game Now")
          542  +				id71 = signal_connect(StartGamebutton, "clicked") do widget
          543  +					println("call the module start")
          544  +					destroy(win)
          545  +				end
          546  +				push!(hbox3,StartGamebutton)
          547  +				showall(win)
          548  +			end
          549  +			
          550  +			push!(hbox2, Local)
          551  +			push!(hbox2, E_turn)
          552  +			showall(win)
          553  +		end
          554  +
          555  +		id3 = signal_connect(replay, "clicked") do widget
          556  +			update_gameval(db,"replay")
          557  +			hbox2 = @Box(:v) 
          558  +			push!(f, hbox2)
          559  +			StartGamebutton = @Button("Start Game Now")
          560  +			id71 = signal_connect(StartGamebutton, "clicked") do widget
          561  +				println("call the module start")
          562  +				destroy(win)
          563  +			end
          564  +			push!(hbox2,StartGamebutton)
          565  +			showall(win)
          566  +		end
          567  +	
          568  +		id4 = signal_connect(Quit, "clicked") do widget
          569  +			destroy(win)
          570  +		end
          571  +	
          572  +		showall(win)
          573  +	end
          574  +	
          575  +buttons()
          576  +	
          577  +	
          578  +end