-
Notifications
You must be signed in to change notification settings - Fork 0
/
page_grid.html
79 lines (72 loc) · 3.71 KB
/
page_grid.html
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
<div class="modal-content modal-content-grid">
<div class="pageBody">
<div>
<h1>One Line : Infinity Grid</h1>
</div>
<div>
<h3>Game Preview</h3>
<img src="image/grid_demo.gif" alt="Game Demo">
</div>
<div>
<h3>·UI Development·</h3>
<div>
<div>
<h5>Layouts</h5>
<p>· Adopted
<b>Linear layout</b> to align items in a row (vertical) or column (horizontally)</p>
<p>· Designed
<b>Grid Layout</b> to align all grids like a chess board, of which the size is up to 12x12</p>
<p>· Defined
<b>Custom Layout</b> to include the game view and a return button, a hint button, and a clear
button</p>
<h5>Styles</h5>
<p>·Created a
<b>Gradient Color</b> of blue and violet as the background color</p>
<p>·Defined
<b>Pure Color</b> sky blue as the button color to increase contrast for better vistual effects</p>
<p>·Imported
<b>SVG Image</b> as a image button to iconically prompt its functionality</p>
<h5>Animations</h5>
<p>·Changed Android Animations such as
<b>Translate and Alpha</b> to show and hide system dialogs</p>
<p>·Calculated
<b>Path</b> to make a demo animation for new players</p>
<h5>Contorlls</h5>
<p>·Implemented
<b>onTouch Events</b> to handle contorllings. Players could swipe on screen to play rather than
just
click</p>
<p>·Attached
<b>onClick Listener</b> to functional buttons </p>
</div>
</div>
<h3>·Theoretics and Algorithms·</h3>
<div>
<div>
<h5>Map Generator Algorithm</h5>
<p>·Initiailize a
<b>Random</b> point as the start point. Mark this point as visited</p>
<p>·Use while loops, every turn generate a
<b>Random</b> feasible point as the next point until there is no feasible point</p>
<p>·Move to this point, mark it as visited. Continue Executing while loops</p>
<p>·If thers is no more feasible point, break while loop and return the result</p>
<h5>Modified Euler Path Theory</h5>
<p>·Declare a 2D
<b>ArrayList</b> as a
<b>Stack</b> to keep track of visited points</p>
<p>·If a point is visited, push this point to
<b>Stack</b>, which is an
<b>ArrayList</b>
</p>
<h5>Adjacency and Border Detection</h5>
<p>·Declare a 2D
<b>ArrayList</b> to keep track of current grid status</p>
<p>·If a point's coordinates(i, j) is inside the array's boundary, it is feasible</p>
<p>·If a point is not in the
<b>Stack</b>, it is feasible</p>
<p>·If a point is not visited, it is feasible</p>
</div>
</div>
</div>
</div>
</div>