sudoku breaker-php edition
Deducer class:
puzzle.php:
1
<?php
2
class Deducer
3
{
4
private $array;
5
public function __construct($array)
6
{
7
$this->array=array();
8
for($row=0;$row<9;$row++)
9
{
10
for($column=0;$column<9;$column++)
11
{
12
$this->array[$row][$column]=$array[$row][$column];
13
}
14
}
15
}
16
private function isFinished()
17
{
18
for($row=0;$row<9;$row++)
19
{
20
for($column=0;$column<9;$column++)
21
{
22
if($this->array[$row][$column]==0)
23
{
24
return false;
25
}
26
}
27
}
28
return true;
29
}
30
public function deduceAll()
31
{
32
if($this->isFinished())
33
{
34
return;
35
}
36
for($row=0;$row<7;$row=$row+3)
37
{
38
for($column=0;$column<7;$column=$column+3)
39
{
40
if($this->reduceFromOneZone($this->array,$row,$column))
41
{
42
$this->deduceAll();
43
return;
44
}
45
}
46
}
47
for($row=0;$row<9;$row++)
48
{
49
if($this->reduceFromOneRow($this->array,$row))
50
{
51
$this->deduceAll();
52
return;
53
}
54
}
55
for($column=0;$column<9;$column++)
56
{
57
if($this->reduceFromOneColumn($this->array,$column))
58
{
59
$this->deduceAll();
60
return;
61
}
62
}
63
for($row=0;$row<7;$row=$row+3)
64
{
65
if($this->reduceFromThreeRows($this->array,$row,$row+2))
66
{
67
$this->deduceAll();
68
return;
69
}
70
}
71
for($column=0;$column<7;$column=$column+3)
72
{
73
if($this->reduceFromThreeColumns($this->array,$column,$column+2))
74
{
75
$this->deduceAll();
76
return;
77
}
78
}
79
}
80
public function deduceOnce()
81
{
82
for($row=0;$row<7;$row=$row+3)
83
{
84
for($column=0;$column<7;$column=$column+3)
85
{
86
if($this->reduceFromOneZone($this->array,$row,$column))
87
{
88
return;
89
}
90
}
91
}
92
for($row=0;$row<9;$row++)
93
{
94
if($this->reduceFromOneRow($this->array,$row))
95
{
96
return;
97
}
98
}
99
for($column=0;$column<9;$column++)
100
{
101
if($this->reduceFromOneColumn($this->array,$column))
102
{
103
return;
104
}
105
}
106
for($row=0;$row<7;$row=$row+3)
107
{
108
if($this->reduceFromThreeRows($this->array,$row,$row+2))
109
{
110
return;
111
}
112
}
113
for($column=0;$column<7;$column=$column+3)
114
{
115
if($this->reduceFromThreeColumns($this->array,$column,$column+2))
116
{
117
return;
118
}
119
}
120
}
121
private function reduceFromOneZone(&$array,$row,$column)
122
{
123
$startRow=(floor($row/3))*3;
124
$startColumn=(floor($column/3))*3;
125
$unknown=array();
126
for($pointer=0;$pointer<9;$pointer++)
127
{
128
$unknown[$pointer]=$pointer+1;
129
}
130
for($rowPointer=$startRow;$rowPointer<$startRow+3;$rowPointer++)
131
{
132
for($columnPointer=$startColumn;$columnPointer<$startColumn+3;$columnPointer++)
133
{
134
if($array[$rowPointer][$columnPointer]!=0)
135
{
136
$unknown[$array[$rowPointer][$columnPointer]-1]=0;
137
}
138
}
139
}
140
for($digit=0;$digit<9;$digit++)
141
{
142
if($unknown[$digit]!=0)
143
{
144
$number=$unknown[$digit];
145
$posibilities=0;
146
$rowPosition=-1;
147
$columnPosition=-1;
148
for($rowPointer=$startRow;$rowPointer<$startRow+3;$rowPointer++)
149
{
150
for($columnPointer=$startColumn;$columnPointer<$startColumn+3;$columnPointer++)
151
{
152
if($array[$rowPointer][$columnPointer]==0)
153
{
154
if($this->isPossibleInThatCellCheckByColumn($array,$number,$rowPointer,$columnPointer)&&$this->isPossibleInThatCellCheckByRow($array,$number,$rowPointer,$columnPointer))
155
{
156
$rowPosition=$rowPointer;
157
$columnPosition=$columnPointer;
158
$posibilities++;
159
}
160
}
161
}
162
}
163
if($posibilities==1)
164
{
165
$array[$rowPosition][$columnPosition]=$number;
166
return true;
167
}
168
}
169
}
170
return false;
171
}
172
private function reduceFromOneRow(&$array,$row)
173
{
174
$unknown=array();
175
for($column=0;$column<9;$column++)
176
{
177
$unknown[$column]=$column+1;
178
}
179
for($column=0;$column<9;$column++)
180
{
181
if($array[$row][$column]!=0)
182
{
183
$unknown[$array[$row][$column]-1]=0;
184
}
185
}
186
for($column=0;$column<9;$column++)
187
{
188
if($unknown[$column]!=0)
189
{
190
$number=$unknown[$column];
191
$posibilities=0;
192
$position=-1;
193
for($pointer=0;$pointer<9;$pointer++)
194
{
195
if($array[$row][$pointer]==0)
196
{
197
if($this->isPossibleInThatCellCheckByColumnAndZone($array,$number,$row,$pointer))
198
{
199
$position=$pointer;
200
$posibilities++;
201
}
202
}
203
}
204
if($posibilities==1)
205
{
206
$array[$row][$position]=$number;
207
return true;
208
}
209
}
210
}
211
return false;
212
}
213
private function reduceFromOneColumn(&$array,$column)
214
{
215
$unknown=array();
216
for($row=0;$row<9;$row++)
217
{
218
$unknown[$row]=$row+1;
219
}
220
for($row=0;$row<9;$row++)
221
{
222
if($array[$row][$column]!=0)
223
{
224
$unknown[$array[$row][$column]-1]=0;
225
}
226
}
227
for($row=0;$row<9;$row++)
228
{
229
if($unknown[$row]!=0)
230
{
231
$number=$unknown[$row];
232
$posibilities=0;
233
$position=-1;
234
for($pointer=0;$pointer<9;$pointer++)
235
{
236
if($array[$pointer][$column]==0)
237
{
238
if($this->isPossibleInThatCellCheckByRowAndZone($array,$number,$pointer,$column))
239
{
240
$position=$pointer;
241
$posibilities++;
242
}
243
}
244
}
245
if($posibilities==1)
246
{
247
$array[$position][$column]=$number;
248
return true;
249
}
250
}
251
}
252
return false;
253
}
254
private function isPossibleInThatCellCheckByRowAndZone($array,$number,$row,$column)
255
{
256
if(!$this->isPossibleInThatCellCheckByRow($array,$number,$row,$column))
257
{
258
return false;
259
}
260
else if(!$this->isPossibleInThatCellCheckByZone($array,$number,$row,$column))
261
{
262
return false;
263
}
264
else if(!$this->canBeInThatZoneCheckByColumn($array,$number,$row,$column))
265
{
266
return false;
267
}
268
else
269
{
270
return true;
271
}
272
}
273
private function isPossibleInThatCellCheckByColumnAndZone($array,$number,$row,$column)
274
{
275
if(!$this->isPossibleInThatCellCheckByColumn($array,$number,$row,$column))
276
{
277
return false;
278
}
279
else if(!$this->isPossibleInThatCellCheckByZone($array,$number,$row,$column))
280
{
281
return false;
282
}
283
else if(!$this->canBeInThatZoneCheckByRow($array,$number,$row,$column))
284
{
285
return false;
286
}
287
else
288
{
289
return true;
290
}
291
}
292
private function canBeInThatZoneCheckByRow($array,$number,$row,$column)
293
{
294
$startRow=(floor($row/3))*3;
295
$startColumn=(floor($column/3))*3;
296
for($rowPointer=$startRow;$rowPointer<$startRow+3;$rowPointer++)
297
{
298
if($rowPointer!=$row)
299
{
300
if(!$this->isPossibleInThatCellCheckByRow($array,$number,$rowPointer,$column))
301
{
302
continue;
303
}
304
$canItBe=true;
305
for($columnPointer=0;$columnPointer<9;$columnPointer++)
306
{
307
if($columnPointer<$startColumn||$columnPointer>$startColumn+2)
308
{
309
if($array[$rowPointer][$columnPointer]==0)
310
{
311
if($this->isPossibleInThatCellCheckByColumn($array,$number,$rowPointer,$columnPointer)&&$this->isPossibleInThatCellCheckByZone($array,$number,$rowPointer,$columnPointer))
312
{
313
$canItBe=false;
314
}
315
}
316
}
317
}
318
if($canItBe)
319
{
320
return false;
321
}
322
}
323
}
324
return true;
325
}
326
private function canBeInThatZoneCheckByColumn($array,$number,$row,$column)
327
{
328
$startRow=(floor($row/3))*3;
329
$startColumn=(floor($column/3))*3;
330
for($columnPointer=$startColumn;$columnPointer<$startColumn+3;$columnPointer++)
331
{
332
if($columnPointer!=$column)
333
{
334
if(!$this->isPossibleInThatCellCheckByColumn($array,$number,$row,$columnPointer))
335
{
336
continue;
337
}
338
$canItBe=true;
339
for($rowPointer=0;$rowPointer<9;$rowPointer++)
340
{
341
if($rowPointer<$startRow||$rowPointer>$startRow+2)
342
{
343
if($array[$rowPointer][$columnPointer]==0)
344
{
345
if($this->isPossibleInThatCellCheckByRow($array,$number,$rowPointer,$columnPointer)&&$this->isPossibleInThatCellCheckByZone($array,$number,$rowPointer,$columnPointer))
346
{
347
$canItBe=false;
348
}
349
}
350
}
351
}
352
if($canItBe)
353
{
354
return false;
355
}
356
}
357
}
358
return true;
359
}
360
private function isPossibleInThatCellCheckByZone($array,$number,$row,$column)
361
{
362
$startRow=(floor($row/3))*3;
363
$startColumn=(floor($column/3))*3;
364
for($rowPointer=$startRow;$rowPointer<$startRow+3;$rowPointer++)
365
{
366
for($columnPointer=$startColumn;$columnPointer<$startColumn+3;$columnPointer++)
367
{
368
if($array[$rowPointer][$columnPointer]==$number)
369
{
370
return false;
371
}
372
}
373
}
374
return true;
375
}
376
private function reduceFromThreeColumns(&$array,$firstColumn,$lastColumn)
377
{
378
$numberAndCount=array();
379
$numberAndPosition=array();
380
for($row=0;$row<9;$row++)
381
{
382
$numberAndCount[$row][0]=$row+1;
383
$numberAndCount[$row][1]=0;
384
}
385
for($row=0;$row<27;$row++)
386
{
387
for($column=0;$column<3;$column++)
388
{
389
$numberAndPosition[$row][$column]=0;
390
}
391
}
392
for($column=$firstColumn;$column<=$lastColumn;$column++)
393
{
394
for($row=0;$row<9;$row++)
395
{
396
if($array[$row][$column]!=0)
397
{
398
$numberAndCount[$array[$row][$column]-1][1]++;
399
$numberAndPosition[9*($column%3)+$row][0]=$array[$row][$column];
400
$numberAndPosition[9*($column%3)+$row][1]=$row;
401
$numberAndPosition[9*($column%3)+$row][2]=$column;
402
}
403
}
404
}
405
for($row=0;$row<9;$row++)
406
{
407
if($numberAndCount[$row][1]==2)
408
{
409
$number=$numberAndCount[$row][0];
410
$pointer=0;
411
$firstAppearanceRowPosition=-1;
412
$firstAppearanceColumnPosition=-1;
413
$secondAppearanceRowPosition=-1;
414
$secondAppearanceColumnPosition=-1;
415
while($pointer<27)
416
{
417
if($numberAndPosition[$pointer][0]==$number)
418
{
419
$firstAppearanceRowPosition=$numberAndPosition[$pointer][1];
420
$firstAppearanceColumnPosition=$numberAndPosition[$pointer][2];
421
$pointer++;
422
break;
423
}
424
else
425
{
426
$pointer++;
427
}
428
}
429
while($pointer<27)
430
{
431
if($numberAndPosition[$pointer][0]==$number)
432
{
433
$secondAppearanceRowPosition=$numberAndPosition[$pointer][1];
434
$secondAppearanceColumnPosition=$numberAndPosition[$pointer][2];
435
break;
436
}
437
else
438
{
439
$pointer++;
440
}
441
}
442
$thirdAppearanceColumnPosition=3*(floor($firstAppearanceColumnPosition/3))+3-$firstAppearanceColumnPosition%3-$secondAppearanceColumnPosition%3;
443
$thirdAppearanceRowStartPosition=(3-(floor($firstAppearanceRowPosition/3))-(floor($secondAppearanceRowPosition/3)))*3;
444
$posibilities=0;
445
$thirdAppearanceRowPosition=-1;
446
for($indicator=$thirdAppearanceRowStartPosition;$indicator<$thirdAppearanceRowStartPosition+3;$indicator++)
447
{
448
if($array[$indicator][$thirdAppearanceColumnPosition]==0)
449
{
450
if($this->isPossibleInThatCellCheckByRow($array,$number,$indicator,$thirdAppearanceColumnPosition))
451
{
452
$thirdAppearanceRowPosition=$indicator;
453
$posibilities++;
454
}
455
}
456
}
457
if($posibilities==1)
458
{
459
$array[$thirdAppearanceRowPosition][$thirdAppearanceColumnPosition]=$number;
460
return true;
461
}
462
}
463
}
464
return false;
465
}
466
private function reduceFromThreeRows(&$array,$firstRow,$lastRow)
467
{
468
$numberAndCount=array();
469
$numberAndPosition=array();
470
for($column=0;$column<9;$column++)
471
{
472
$numberAndCount[0][$column]=$column+1;
473
$numberAndCount[1][$column]=0;
474
}
475
for($row=0;$row<3;$row++)
476
{
477
for($column=0;$column<27;$column++)
478
{
479
$numberAndPosition[$row][$column]=0;
480
}
481
}
482
for($row=$firstRow;$row<=$lastRow;$row++)
483
{
484
for($column=0;$column<9;$column++)
485
{
486
if($array[$row][$column]!=0)
487
{
488
$numberAndCount[1][$array[$row][$column]-1]++;
489
$numberAndPosition[0][9*($row%3)+$column]=$array[$row][$column];
490
$numberAndPosition[1][9*($row%3)+$column]=$row;
491
$numberAndPosition[2][9*($row%3)+$column]=$column;
492
}
493
}
494
}
495
for($column=0;$column<9;$column++)
496
{
497
if($numberAndCount[1][$column]==2)
498
{
499
$number=$numberAndCount[0][$column];
500
$pointer=0;
501
$firstAppearanceRowPosition=-1;
502
$firstAppearanceColumnPosition=-1;
503
$secondAppearanceRowPosition=-1;
504
$secondAppearanceColumnPosition=-1;
505
while($pointer<27)
506
{
507
if($numberAndPosition[0][$pointer]==$number)
508
{
509
$firstAppearanceRowPosition=$numberAndPosition[1][$pointer];
510
$firstAppearanceColumnPosition=$numberAndPosition[2][$pointer];
511
$pointer++;
512
break;
513
}
514
else
515
{
516
$pointer++;
517
}
518
}
519
while($pointer<27)
520
{
521
if($numberAndPosition[0][$pointer]==$number)
522
{
523
$secondAppearanceRowPosition=$numberAndPosition[1][$pointer];
524
$secondAppearanceColumnPosition=$numberAndPosition[2][$pointer];
525
break;
526
}
527
else
528
{
529
$pointer++;
530
}
531
}
532
$thirdAppearanceRowPosition=3*(floor($firstAppearanceRowPosition/3))+3-$firstAppearanceRowPosition%3-$secondAppearanceRowPosition%3;
533
$thirdAppearanceColumnStartPosition=(3-(floor($firstAppearanceColumnPosition/3))-(floor($secondAppearanceColumnPosition/3)))*3;
534
$posibilities=0;
535
$thirdAppearanceColumnPosition=-1;
536
for($indicator=$thirdAppearanceColumnStartPosition;$indicator<$thirdAppearanceColumnStartPosition+3;$indicator++)
537
{
538
if($array[$thirdAppearanceRowPosition][$indicator]==0)
539
{
540
if($this->isPossibleInThatCellCheckByColumn($array,$number,$thirdAppearanceRowPosition,$indicator))
541
{
542
$thirdAppearanceColumnPosition=$indicator;
543
$posibilities++;
544
}
545
}
546
}
547
if($posibilities==1)
548
{
549
$array[$thirdAppearanceRowPosition][$thirdAppearanceColumnPosition]=$number;
550
return true;
551
}
552
}
553
}
554
return false;
555
}
556
private function isPossibleInThatCellCheckByColumn($array,$number,$row,$column)
557
{
558
for($pointer=0;$pointer<9;$pointer++)
559
{
560
if($pointer!=$row)
561
{
562
if($array[$pointer][$column]==$number)
563
{
564
return false;
565
}
566
}
567
}
568
return true;
569
}
570
private function isPossibleInThatCellCheckByRow($array,$number,$row,$column)
571
{
572
for($pointer=0;$pointer<9;$pointer++)
573
{
574
if($pointer!=$column)
575
{
576
if($array[$row][$pointer]==$number)
577
{
578
return false;
579
}
580
}
581
}
582
return true;
583
}
584
public function getArray()
585
{
586
return $this->array;
587
}
588
}
589
?>

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

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

puzzle.php:
1
<?php
2
include('Deducer.php');
3
if(isset($_POST["type"]))
4
{
5
try
6
{
7
$array=$_POST["array"];
8
$numbers=split(",",$array);
9
$dealingArray=array();
10
for($row=0;$row<9;$row++)
11
{
12
for($column=0;$column<9;$column++)
13
{
14
$dealingArray[$row][$column]=(int)$numbers[$row*9+$column];
15
}
16
}
17
$deducer=new Deducer($dealingArray);
18
if($_POST["type"]=="OneStep")
19
{
20
$deducer->deduceOnce();
21
}
22
else if($_POST["type"]=="AllSteps")
23
{
24
$deducer->deduceAll();
25
}
26
$resultArray=$deducer->getArray();
27
$sb="";
28
for($row=0;$row<9;$row++)
29
{
30
for($column=0;$column<9;$column++)
31
{
32
if($sb=="")
33
{
34
$sb=$sb.$resultArray[$row][$column];
35
}
36
else
37
{
38
$sb=$sb.",".$resultArray[$row][$column];
39
}
40
}
41
}
42
echo $sb;
43
}
44
catch (Exception $e)
45
{
46
echo "ri";
47
}
48
return;
49
}
50
?>
51
<html>
52
<body>
53
<script>
54
var request=false;
55
try
56
{
57
request = new XMLHttpRequest();//Firefox
58
}
59
catch(trymicrosoft)
60
{
61
try
62
{
63
request = new ActiveXObject("Msxml2.XMLHTTP.5.0");//New IE
64
}
65
catch(othermicrosoft)
66
{
67
try
68
{
69
request = new ActiveXObject("Microsoft.XMLHTTP");//Old IE
70
}
71
catch(failed)
72
{
73
request = false;//Unknown browser
74
}
75
}
76
}
77
if(!request)
78
{
79
alert("Please use Internet Explorer");
80
}
81
function dealNullInput(input)
82
{
83
if(input=="")
84
{
85
return "0";
86
}
87
else
88
{
89
return input;
90
}
91
}
92
function dealZeroOutput(input)
93
{
94
if(input==0)
95
{
96
return "";
97
}
98
else
99
{
100
return input;
101
}
102
}
103
function sendOneStepRequest()
104
{
105
url=escape("puzzle.php")+"?random=" + Math.random();//use a random number to avoid cache
106
request.open("POST",url,true);//connection method
107
request.onreadystatechange=showProcess;//show Process method
108
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');
109
var array="";
110
for(var i=0;i<81;i++)
111
{
112
if(array=="")
113
{
114
array=array+dealNullInput(document.getElementsByName("TextBox")[i].value);
115
}
116
else
117
{
118
array=array+","+dealNullInput(document.getElementsByName("TextBox")[i].value);
119
}
120
}
121
request.send("type=OneStep"+"&array="+escape(array));
122
}
123
function sendAllStepsRequest()
124
{
125
url=escape("puzzle.php")+"?random=" + Math.random();
126
request.open("POST",url,true);//connection method
127
request.onreadystatechange=showProcess;//show Process method
128
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');
129
var array="";
130
for(var i=0;i<81;i++)
131
{
132
if(array=="")
133
{
134
array=array+dealNullInput(document.getElementsByName("TextBox")[i].value);
135
}
136
else
137
{
138
array=array+","+dealNullInput(document.getElementsByName("TextBox")[i].value.replace(/ /g, ""));
139
}
140
}
141
request.send("type=AllSteps"+"&array="+escape(array));
142
}
143
function showProcess()
144
{
145
if(request.readyState == 4)//finished
146
{
147
if(request.status == 200)//normal
148
{
149
var splitResult=request.responseText.split(",");
150
for(var i=0;i<81;i++)
151
{
152
document.getElementsByName("TextBox")[i].value=dealZeroOutput(splitResult[i]);
153
}
154
}
155
}
156
else if(request.readyState == 1)
157
{
158
//"finished step1";
159
}
160
else if(request.readyState == 2)
161
{
162
//"finished step2";
163
}
164
else if(request.readyState == 3)
165
{
166
//"finished step3";
167
}
168
}
169
</script>
170
<table>
171
<tr>
172
<td>
173
<input name="TextBox" type="text" style="width: 25px"/>
174
</td>
175
<td>
176
<input name="TextBox" type="text" style="width: 25px"/>
177
</td>
178
<td>
179
<input name="TextBox" type="text" style="width: 25px"/>
180
</td>
181
<td>
182
<input name="TextBox" type="text" style="width: 25px"/>
183
</td>
184
<td>
185
<input name="TextBox" type="text" style="width: 25px"/>
186
</td>
187
<td>
188
<input name="TextBox" type="text" style="width: 25px"/>
189
</td>
190
<td>
191
<input name="TextBox" type="text" style="width: 25px"/>
192
</td>
193
<td>
194
<input name="TextBox" type="text" style="width: 25px"/>
195
</td>
196
<td>
197
<input name="TextBox" type="text" style="width: 25px"/>
198
</td>
199
</tr>
200
<tr>
201
<td>
202
<input name="TextBox" type="text" style="width: 25px"/>
203
</td>
204
<td>
205
<input name="TextBox" type="text" style="width: 25px"/>
206
</td>
207
<td>
208
<input name="TextBox" type="text" style="width: 25px"/>
209
</td>
210
<td>
211
<input name="TextBox" type="text" style="width: 25px"/>
212
</td>
213
<td>
214
<input name="TextBox" type="text" style="width: 25px"/>
215
</td>
216
<td>
217
<input name="TextBox" type="text" style="width: 25px"/>
218
</td>
219
<td>
220
<input name="TextBox" type="text" style="width: 25px"/>
221
</td>
222
<td>
223
<input name="TextBox" type="text" style="width: 25px"/>
224
</td>
225
<td>
226
<input name="TextBox" type="text" style="width: 25px"/>
227
</td>
228
</tr>
229
<tr>
230
<td>
231
<input name="TextBox" type="text" style="width: 25px"/>
232
</td>
233
<td>
234
<input name="TextBox" type="text" style="width: 25px"/>
235
</td>
236
<td>
237
<input name="TextBox" type="text" style="width: 25px"/>
238
</td>
239
<td>
240
<input name="TextBox" type="text" style="width: 25px"/>
241
</td>
242
<td>
243
<input name="TextBox" type="text" style="width: 25px"/>
244
</td>
245
<td>
246
<input name="TextBox" type="text" style="width: 25px"/>
247
</td>
248
<td>
249
<input name="TextBox" type="text" style="width: 25px"/>
250
</td>
251
<td>
252
<input name="TextBox" type="text" style="width: 25px"/>
253
</td>
254
<td>
255
<input name="TextBox" type="text" style="width: 25px"/>
256
</td>
257
</tr>
258
<tr>
259
<td>
260
<input name="TextBox" type="text" style="width: 25px"/>
261
</td>
262
<td>
263
<input name="TextBox" type="text" style="width: 25px"/>
264
</td>
265
<td>
266
<input name="TextBox" type="text" style="width: 25px"/>
267
</td>
268
<td>
269
<input name="TextBox" type="text" style="width: 25px"/>
270
</td>
271
<td>
272
<input name="TextBox" type="text" style="width: 25px"/>
273
</td>
274
<td>
275
<input name="TextBox" type="text" style="width: 25px"/>
276
</td>
277
<td>
278
<input name="TextBox" type="text" style="width: 25px"/>
279
</td>
280
<td>
281
<input name="TextBox" type="text" style="width: 25px"/>
282
</td>
283
<td>
284
<input name="TextBox" type="text" style="width: 25px"/>
285
</td>
286
</tr>
287
<tr>
288
<td>
289
<input name="TextBox" type="text" style="width: 25px"/>
290
</td>
291
<td>
292
<input name="TextBox" type="text" style="width: 25px"/>
293
</td>
294
<td>
295
<input name="TextBox" type="text" style="width: 25px"/>
296
</td>
297
<td>
298
<input name="TextBox" type="text" style="width: 25px"/>
299
</td>
300
<td>
301
<input name="TextBox" type="text" style="width: 25px"/>
302
</td>
303
<td>
304
<input name="TextBox" type="text" style="width: 25px"/>
305
</td>
306
<td>
307
<input name="TextBox" type="text" style="width: 25px"/>
308
</td>
309
<td>
310
<input name="TextBox" type="text" style="width: 25px"/>
311
</td>
312
<td>
313
<input name="TextBox" type="text" style="width: 25px"/>
314
</td>
315
</tr>
316
<tr>
317
<td>
318
<input name="TextBox" type="text" style="width: 25px"/>
319
</td>
320
<td>
321
<input name="TextBox" type="text" style="width: 25px"/>
322
</td>
323
<td>
324
<input name="TextBox" type="text" style="width: 25px"/>
325
</td>
326
<td>
327
<input name="TextBox" type="text" style="width: 25px"/>
328
</td>
329
<td>
330
<input name="TextBox" type="text" style="width: 25px"/>
331
</td>
332
<td>
333
<input name="TextBox" type="text" style="width: 25px"/>
334
</td>
335
<td>
336
<input name="TextBox" type="text" style="width: 25px"/>
337
</td>
338
<td>
339
<input name="TextBox" type="text" style="width: 25px"/>
340
</td>
341
<td>
342
<input name="TextBox" type="text" style="width: 25px"/>
343
</td>
344
</tr>
345
<tr>
346
<td>
347
<input name="TextBox" type="text" style="width: 25px"/>
348
</td>
349
<td>
350
<input name="TextBox" type="text" style="width: 25px"/>
351
</td>
352
<td>
353
<input name="TextBox" type="text" style="width: 25px"/>
354
</td>
355
<td>
356
<input name="TextBox" type="text" style="width: 25px"/>
357
</td>
358
<td>
359
<input name="TextBox" type="text" style="width: 25px"/>
360
</td>
361
<td>
362
<input name="TextBox" type="text" style="width: 25px"/>
363
</td>
364
<td>
365
<input name="TextBox" type="text" style="width: 25px"/>
366
</td>
367
<td>
368
<input name="TextBox" type="text" style="width: 25px"/>
369
</td>
370
<td>
371
<input name="TextBox" type="text" style="width: 25px"/>
372
</td>
373
</tr>
374
<tr>
375
<td>
376
<input name="TextBox" type="text" style="width: 25px"/>
377
</td>
378
<td>
379
<input name="TextBox" type="text" style="width: 25px"/>
380
</td>
381
<td>
382
<input name="TextBox" type="text" style="width: 25px"/>
383
</td>
384
<td>
385
<input name="TextBox" type="text" style="width: 25px"/>
386
</td>
387
<td>
388
<input name="TextBox" type="text" style="width: 25px"/>
389
</td>
390
<td>
391
<input name="TextBox" type="text" style="width: 25px"/>
392
</td>
393
<td>
394
<input name="TextBox" type="text" style="width: 25px"/>
395
</td>
396
<td>
397
<input name="TextBox" type="text" style="width: 25px"/>
398
</td>
399
<td>
400
<input name="TextBox" type="text" style="width: 25px"/>
401
</td>
402
</tr>
403
<tr>
404
<td>
405
<input name="TextBox" type="text" style="width: 25px"/>
406
</td>
407
<td>
408
<input name="TextBox" type="text" style="width: 25px"/>
409
</td>
410
<td>
411
<input name="TextBox" type="text" style="width: 25px"/>
412
</td>
413
<td>
414
<input name="TextBox" type="text" style="width: 25px"/>
415
</td>
416
<td>
417
<input name="TextBox" type="text" style="width: 25px"/>
418
</td>
419
<td>
420
<input name="TextBox" type="text" style="width: 25px"/>
421
</td>
422
<td>
423
<input name="TextBox" type="text" style="width: 25px"/>
424
</td>
425
<td>
426
<input name="TextBox" type="text" style="width: 25px"/>
427
</td>
428
<td>
429
<input name="TextBox" type="text" style="width: 25px"/>
430
</td>
431
</tr>
432
</table>
433
<input type="button" name="OneStep" value="OneStep" id="OneStep" onclick="sendOneStepRequest()" />
434
<input type="button" name="AllSteps" value="AllSteps" id="AllSteps" onclick="sendAllStepsRequest()" />
435
</body>
436
</html>

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

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436
