Browse Source

v1.7

master v1.7
Dnomd343 5 years ago
parent
commit
0c7dc5db85
  1. 69
      Form_Game.frm
  2. 6
      Form_Solution.frm
  3. 5
      Form_Wait.frm
  4. 2
      HRD_Game.vbp
  5. 2
      HRD_Game.vbw

69
Form_Game.frm

@ -2,7 +2,7 @@ VERSION 5.00
Begin VB.Form Form_Game Begin VB.Form Form_Game
AutoRedraw = -1 'True AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single BorderStyle = 1 'Fixed Single
Caption = "HRD Game v1.6 by Dnomd343" Caption = "HRD Game v1.7 by Dnomd343"
ClientHeight = 7305 ClientHeight = 7305
ClientLeft = 45 ClientLeft = 45
ClientTop = 690 ClientTop = 690
@ -14,12 +14,20 @@ Begin VB.Form Form_Game
ScaleHeight = 7305 ScaleHeight = 7305
ScaleWidth = 7290 ScaleWidth = 7290
StartUpPosition = 2 '屏幕中心 StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command_Prompt
Caption = "提示下一步"
Height = 495
Left = 5760
TabIndex = 14
Top = 4440
Width = 1335
End
Begin VB.CommandButton Command_Solution Begin VB.CommandButton Command_Solution
Caption = "最少步解法" Caption = "最少步解法"
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 13 TabIndex = 13
Top = 5520 Top = 5760
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Add_Favourite Begin VB.CommandButton Command_Add_Favourite
@ -27,7 +35,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 12 TabIndex = 12
Top = 3000 Top = 2640
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Favourite Begin VB.CommandButton Command_Favourite
@ -35,7 +43,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 11 TabIndex = 11
Top = 2280 Top = 1920
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Reduction_Snapshot Begin VB.CommandButton Command_Reduction_Snapshot
@ -43,7 +51,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 10 TabIndex = 10
Top = 4200 Top = 3840
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Create_Snapshot Begin VB.CommandButton Command_Create_Snapshot
@ -51,7 +59,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 9 TabIndex = 9
Top = 3600 Top = 3240
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Rand_Case Begin VB.CommandButton Command_Rand_Case
@ -59,7 +67,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 8 TabIndex = 8
Top = 1680 Top = 1320
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Select_Case Begin VB.CommandButton Command_Select_Case
@ -67,7 +75,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 7 TabIndex = 7
Top = 1080 Top = 720
Width = 1335 Width = 1335
End End
Begin VB.CommandButton Command_Create_Case Begin VB.CommandButton Command_Create_Case
@ -75,7 +83,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 6 TabIndex = 6
Top = 480 Top = 120
Width = 1335 Width = 1335
End End
Begin VB.Timer Timer_Layout Begin VB.Timer Timer_Layout
@ -88,7 +96,7 @@ Begin VB.Form Form_Game
Height = 495 Height = 495
Left = 5760 Left = 5760
TabIndex = 1 TabIndex = 1
Top = 4800 Top = 5040
Width = 1335 Width = 1335
End End
Begin VB.Timer Timer_Get_Time Begin VB.Timer Timer_Get_Time
@ -179,6 +187,7 @@ Dim mouse_x As Long, mouse_y As Long, mouse_button As Integer
Dim last_move As Integer, move_times As Integer Dim last_move As Integer, move_times As Integer
Dim total_steps As Long, total_time As Long Dim total_steps As Long, total_time As Long
Dim snapshot_code As String, snapshot_step As Long Dim snapshot_code As String, snapshot_step As Long
Dim prompt_wait_data As Boolean
Private Sub Menu_Debug_Mode_Click() Private Sub Menu_Debug_Mode_Click()
Menu_Debug_Mode.Checked = Not Menu_Debug_Mode.Checked Menu_Debug_Mode.Checked = Not Menu_Debug_Mode.Checked
If Menu_Debug_Mode.Checked = True Then debug_mode = True Else debug_mode = False If Menu_Debug_Mode.Checked = True Then debug_mode = True Else debug_mode = False
@ -335,6 +344,16 @@ Private Sub Command_Reduction_Snapshot_Click()
Label_Step = "步数: " & total_steps Label_Step = "步数: " & total_steps
Label_Code = snapshot_code Label_Code = snapshot_code
End Sub End Sub
Private Sub Command_Prompt_Click()
If solve_compete = True Then MsgBox "你已经解好啦", , "> _ <": Exit Sub
wait_file_name = Label_Code & ".txt"
If Dir(Label_Code & ".txt") <> "" Then Kill Label_Code & ".txt"
Shell "Engine.exe -q " & Label_Code
wait_cancel = False
waiting = True
prompt_wait_data = True
Form_Wait.Show 1
End Sub
Private Sub Command_Reset_Click() Private Sub Command_Reset_Click()
total_steps = 0 total_steps = 0
total_time = 0 total_time = 0
@ -946,7 +965,7 @@ Private Sub Timer_Debug_Timer()
Text_Debug = debug_dat Text_Debug = debug_dat
End Sub End Sub
Private Sub Timer_Layout_Timer() Private Sub Timer_Layout_Timer()
Dim width As Integer Dim width As Integer, temp As String
width = gap * 5 + square_width * 4 width = gap * 5 + square_width * 4
Label_Title.Top = 45 Label_Title.Top = 45
Label_Code.Top = 7000 Label_Code.Top = 7000
@ -978,4 +997,32 @@ Private Sub Timer_Layout_Timer()
Call Analyse(start_code) Call Analyse(start_code)
Call Output_Graph Call Output_Graph
End If End If
If prompt_wait_data = True And waiting = False Then
prompt_wait_data = False
Open Label_Code.Caption & ".txt" For Input As #1
Line Input #1, temp
If temp = "No Solution" Then
MsgBox "无解", , "> _ <"
Else
Line Input #1, temp
Line Input #1, temp
last_move = 10
If total_steps = 0 Then
playing = True
Timer_Get_Time.Enabled = True
End If
total_steps = total_steps + 1
Label_Step = "步数: " & total_steps
Label_Code = temp
Call Analyse(temp)
Call Output_Graph
If Block(0).address = 13 Then
Timer_Get_Time = False
playing = False
solve_compete = True
MsgBox "恭喜你成功完成!" & vbCrLf & "编码: " & start_code & vbCrLf & "步数: " & total_steps & vbCrLf & "用时: " & Right(Label_Time, Len(Label_Time) - 4), , "(>__<)"
End If
End If
Close #1
End If
End Sub End Sub

6
Form_Solution.frm

@ -60,12 +60,12 @@ Begin VB.Form Form_Solution
Width = 615 Width = 615
End End
Begin VB.ListBox List_Solution Begin VB.ListBox List_Solution
Height = 4560 Height = 4740
ItemData = "Form_Solution.frx":0000 ItemData = "Form_Solution.frx":0000
Left = 3720 Left = 3720
List = "Form_Solution.frx":0002 List = "Form_Solution.frx":0002
TabIndex = 0 TabIndex = 0
Top = 360 Top = 290
Width = 1455 Width = 1455
End End
Begin VB.Timer Timer_Get_Data Begin VB.Timer Timer_Get_Data
@ -78,7 +78,7 @@ Begin VB.Form Form_Solution
Height = 180 Height = 180
Left = 0 Left = 0
TabIndex = 6 TabIndex = 6
Top = 120 Top = 80
Width = 90 Width = 90
End End
End End

5
Form_Wait.frm

@ -1,12 +1,12 @@
VERSION 5.00 VERSION 5.00
Begin VB.Form Form_Wait Begin VB.Form Form_Wait
BorderStyle = 0 'None BorderStyle = 0 'None
ClientHeight = 1140 ClientHeight = 465
ClientLeft = 0 ClientLeft = 0
ClientTop = 0 ClientTop = 0
ClientWidth = 1920 ClientWidth = 1920
LinkTopic = "Form1" LinkTopic = "Form1"
ScaleHeight = 1140 ScaleHeight = 465
ScaleWidth = 1920 ScaleWidth = 1920
ShowInTaskbar = 0 'False ShowInTaskbar = 0 'False
StartUpPosition = 2 'ÆÁÄ»ÖÐÐÄ StartUpPosition = 2 'ÆÁÄ»ÖÐÐÄ
@ -45,6 +45,7 @@ Begin VB.Form Form_Wait
Height = 465 Height = 465
Left = 0 Left = 0
TabIndex = 0 TabIndex = 0
ToolTipText = "双击可取消哦"
Top = 0 Top = 0
Width = 1920 Width = 1920
End End

2
HRD_Game.vbp

@ -19,7 +19,7 @@ Name="HRD_Game"
HelpContextID="0" HelpContextID="0"
CompatibleMode="0" CompatibleMode="0"
MajorVer=1 MajorVer=1
MinorVer=6 MinorVer=7
RevisionVer=0 RevisionVer=0
AutoIncrementVer=0 AutoIncrementVer=0
ServerSupportFiles=0 ServerSupportFiles=0

2
HRD_Game.vbw

@ -1,6 +1,6 @@
Form_Game = 52, 52, 883, 479, , 26, 28, 857, 453, C Form_Game = 52, 52, 883, 479, , 26, 28, 857, 453, C
Module = 52, 52, 883, 479, Module = 52, 52, 883, 479,
Form_Classic_Cases = 104, 104, 891, 531, , 104, 104, 937, 531, C Form_Classic_Cases = 104, 104, 891, 531, Z, 104, 104, 937, 531, C
Form_Creator = 130, 130, 917, 557, , 104, 104, 891, 531, C Form_Creator = 130, 130, 917, 557, , 104, 104, 891, 531, C
Form_Rand_Case = 78, 78, 855, 505, , 156, 156, 933, 583, C Form_Rand_Case = 78, 78, 855, 505, , 156, 156, 933, 583, C
Form_Favourite = 52, 52, 829, 479, , 26, 26, 803, 453, C Form_Favourite = 52, 52, 829, 479, , 26, 26, 803, 453, C

Loading…
Cancel
Save