-
Notifications
You must be signed in to change notification settings - Fork 7
/
water.lfm
162 lines (162 loc) · 4.5 KB
/
water.lfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
object Form1: TForm1
Left = 1160
Height = 619
Top = 179
Width = 847
Caption = 'ColorSortSolver'
ClientHeight = 619
ClientWidth = 847
KeyPreview = True
OnClose = FormClose
OnCreate = FormCreate
OnKeyDown = FormKeyDown
OnKeyUp = FormKeyUp
LCLVersion = '2.0.12.0'
object BSolve: TButton
Left = 15
Height = 25
Top = 583
Width = 116
Anchors = [akLeft, akBottom]
Caption = 'Solve optimal'
OnClick = BSolveClick
TabOrder = 0
end
object Memo1: TMemo
Left = 0
Height = 214
Top = 352
Width = 847
Anchors = [akLeft, akRight, akBottom]
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -16
Font.Name = 'Courier'
Font.Pitch = fpFixed
Font.Quality = fqDraft
Lines.Strings = (
'Goal of the puzzle is a position as shown above, but the empty containers (white) may also end in other positions. You can move blocks around by left clicking the source and the destination container. The top block of the source is removed and dropped into the destination container, but in case the destination is not empty the colors must match.'
'In "Single Block Mode" only one block is removed from the source container, else as many blocks of the same color as possible.'
''
'1. Choose the number of colors, the number of empty containers and their volume.'
'2. Press "Random puzzle" to create a random position or press Ctrl or Shift and use the'
' mouse to swap blocks if you want to create a specific puzzle position. '
'3. You can try to solve a position manually by clicking first on the source'
' and then on the destination container. '
' At any point you can press the button "Solve optimal" to find the shortest solution to '
' solve the puzzle from the current position.'
'4. Use the "Undo Move" button if you get stuck. '
''
'For puzzles of reasonable size the optimal solver returns the shortest possible solution within less than a second. This applies to all know puzzles of this type with names like "Water Sort Puzzle", "Ball Sort Puzzle", "Sort Hoop", "Sort It 3D" etc.'
''
'The solver stops with the message ''Node limit exceeded!'' if for very large puzzle sizes the RAM memory usage becomes too high. '
)
ParentFont = False
ParentShowHint = False
ScrollBars = ssBoth
TabOrder = 1
end
object NColorsSpin: TSpinEdit
Left = 599
Height = 23
Top = 585
Width = 37
Anchors = [akLeft, akBottom]
MaxValue = 14
MinValue = 2
OnChange = NColorsSpinChange
TabOrder = 2
Value = 9
end
object Label1: TLabel
Left = 549
Height = 15
Top = 588
Width = 43
Anchors = [akLeft, akBottom]
Caption = 'NColors'
ParentColor = False
end
object Label2: TLabel
Left = 643
Height = 15
Top = 589
Width = 43
Anchors = [akLeft, akBottom]
Caption = 'NEmpty'
ParentColor = False
end
object NFreeVialSpin: TSpinEdit
Left = 692
Height = 23
Top = 585
Width = 37
Anchors = [akLeft, akBottom]
MaxValue = 3
MinValue = 1
OnChange = NFreeVialSpinChange
TabOrder = 3
Value = 2
end
object NVolumeSpin: TSpinEdit
Left = 792
Height = 23
Top = 585
Width = 37
Anchors = [akLeft, akBottom]
MaxValue = 20
MinValue = 2
OnChange = NVolumeSpinChange
TabOrder = 4
Value = 5
end
object Label3: TLabel
Left = 737
Height = 15
Top = 588
Width = 49
Anchors = [akLeft, akBottom]
Caption = 'NVolume'
ParentColor = False
end
object TBRandom: TButton
Left = 316
Height = 25
Top = 583
Width = 98
Anchors = [akLeft, akBottom]
Caption = 'Random Puzzle'
OnClick = TBRandomClick
TabOrder = 5
end
object Panel1: TPanel
Left = 0
Height = 352
Top = 0
Width = 849
Anchors = [akTop, akLeft, akRight, akBottom]
TabOrder = 6
OnMouseDown = Panel1MouseDown
OnPaint = Panel1Paint
end
object BUndo: TButton
Left = 151
Height = 25
Top = 583
Width = 96
Anchors = [akLeft, akBottom]
Caption = 'Undo Move'
OnClick = BUndoClick
TabOrder = 7
end
object CBSingle: TCheckBox
Left = 424
Height = 19
Top = 585
Width = 118
Anchors = [akLeft, akBottom]
Caption = 'Single Block Mode'
OnChange = CBSingleChange
TabOrder = 8
end
end