Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김한준
/
OSS-Term-Project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김한준
2019-06-04 20:24:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ad80a39711a30f58472f0d2f703b517b9eae4a8
4ad80a39
1 parent
7067e5fe
누적 번호 보기 및 번호 추천 기능 추가
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
114 additions
and
4 deletions
js/main.js
js/main.js
View file @
4ad80a3
var
data
;
var
acum_list
=
new
Array
();
for
(
i
=
0
;
i
<
45
;
i
++
){
acum_list
[
i
]
=
0
;
}
$
(
document
).
ready
(
function
()
{
var
dropdown
=
$
(
'#selectBox'
);
...
...
@@ -48,6 +53,8 @@ function count() {
return
a
[
0
]
-
b
[
0
];
};
$
(
'#lottotable'
).
html
(
""
);
//초기화
$
(
'#accumulate_table'
).
html
(
""
);
//초기화
$
(
'#recom_table'
).
html
(
""
);
var
win1
=
0
;
var
win2
=
0
;
var
win3
=
0
;
...
...
@@ -87,7 +94,7 @@ function count() {
}
}
roll
(
dice
(
1
,
45
,
0
));
// console.log("No." + (list_length) + ": " + val);
for
(
m
=
0
;
m
<
6
;
m
++
)
{
if
(
val
[
j
][
0
]
==
data
.
nums
[
m
])
{
...
...
@@ -100,7 +107,7 @@ function count() {
val
[
j
][
1
]
=
2
;
match_b
=
1
;
}
}
}
// console.log("before sort: "+val);
val
.
sort
(
numberSort
);
// console.log("after sort: "+val);
...
...
@@ -131,7 +138,19 @@ function count() {
list
+=
'<div class="output '
+
num_class
+
'">'
+
val
[
j
][
0
]
+
'</div>'
;
// console.log(match);
}
var
win_class
;
acum_list
[
val
[
0
][
0
]
-
1
]
+=
1
;
acum_list
[
val
[
1
][
0
]
-
1
]
+=
1
;
acum_list
[
val
[
2
][
0
]
-
1
]
+=
1
;
acum_list
[
val
[
3
][
0
]
-
1
]
+=
1
;
acum_list
[
val
[
4
][
0
]
-
1
]
+=
1
;
acum_list
[
val
[
5
][
0
]
-
1
]
+=
1
;
var
win_class
;
if
(
match
==
6
)
{
win_class
=
'win win1'
;
win1
++
;
...
...
@@ -167,9 +186,9 @@ function count() {
if
(
--
i
)
engine
(
i
);
},
0
)
})(
$
(
'#inputnum'
).
val
());
var
totalmatch
=
(
win1
+
win2
+
win3
+
win4
+
win5
)
var
totalbuy
=
$
(
'#inputnum'
).
val
();
}
function
loadlot
(
a
)
{
...
...
@@ -195,3 +214,94 @@ function loadlot(a) {
data
=
a
;
}
function
accumulate_number
()
{
/*
for(i=0;i<45;i++){
<-document.write((i+1)+"번 : "+acum_list[i]+"<br>");
}
*/
var
temp
=
JSON
.
parse
(
JSON
.
stringify
(
acum_list
));
var
out_temp
=
JSON
.
parse
(
JSON
.
stringify
(
acum_list
));
temp
.
sort
(
function
(
a
,
b
){
return
a
-
b
});
var
recom_number
=
new
Array
();
$
(
'#recom_table'
).
append
(
'<section id="recom_section" class="shadow"></scetion>'
);
for
(
i
=
44
;
i
>=
0
;
i
--
)
{
for
(
j
=
0
;
j
<
45
;
j
++
){
if
(
temp
[
i
]
==
out_temp
[
j
]){
if
(
j
<
9
)
$
(
'#recom_section'
).
append
(
'<div class="output c1">'
+
(
j
+
1
)
+
'</div>'
+
'<progress value="'
+
temp
[
i
]
+
'" max="'
+
(
temp
[
44
]
+
20
)
+
'"></progress>'
+
' '
+
temp
[
i
]);
else
if
(
j
<
19
)
$
(
'#recom_section'
).
append
(
'<div class="output c2">'
+
(
j
+
1
)
+
'</div>'
+
'<progress value="'
+
temp
[
i
]
+
'" max="'
+
(
temp
[
44
]
+
20
)
+
'"></progress>'
+
' '
+
temp
[
i
]);
else
if
(
j
<
29
)
$
(
'#recom_section'
).
append
(
'<div class="output c3">'
+
(
j
+
1
)
+
'</div>'
+
'<progress value="'
+
temp
[
i
]
+
'" max="'
+
(
temp
[
44
]
+
20
)
+
'"></progress>'
+
' '
+
temp
[
i
]);
else
if
(
j
<
39
)
$
(
'#recom_section'
).
append
(
'<div class="output c4">'
+
(
j
+
1
)
+
'</div>'
+
'<progress value="'
+
temp
[
i
]
+
'" max="'
+
(
temp
[
44
]
+
20
)
+
'"></progress>'
+
' '
+
temp
[
i
]);
else
$
(
'#recom_section'
).
append
(
'<div class="output c5">'
+
(
j
+
1
)
+
'</div>'
+
'<progress value="'
+
temp
[
i
]
+
'" max="'
+
(
temp
[
44
]
+
20
)
+
'"></progress>'
+
' '
+
temp
[
i
]);
out_temp
[
j
]
=
null
;
if
(
i
>
38
){
recom_number
[
44
-
i
]
=
j
+
1
;
}
break
;
}
}
}
recom_number
.
sort
(
function
(
a
,
b
){
return
a
-
b
});
var
numberSort
=
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
];
};
$
(
'#lottotable'
).
html
(
""
);
//초기화
$
(
'#accumulate_table'
).
html
(
""
);
//초기화
var
list
=
""
;
var
num_class
=
"c2 "
;
list
+=
'<div class="output '
+
num_class
+
'">'
+
"3"
+
'</div>'
;
$
(
'#accumulate_table'
).
append
(
'<section id="accumulate_section" class="shadow"></scetion>'
);
$
(
"#accumulate_section"
).
append
(
'추천 로또 번호(누적 상위 6개)'
+
'</font>'
+
'<br>'
+
'<br>'
);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
recom_number
[
i
]
<=
10
)
{
$
(
'#accumulate_section'
).
append
(
'<div class="output c1">'
+
recom_number
[
i
]
+
'</div>'
);
}
else
if
(
recom_number
[
i
]
<=
20
)
{
$
(
'#accumulate_section'
).
append
(
'<div class="output c2">'
+
recom_number
[
i
]
+
'</div>'
);
}
else
if
(
recom_number
[
i
]
<=
30
)
{
$
(
'#accumulate_section'
).
append
(
'<div class="output c3">'
+
recom_number
[
i
]
+
'</div>'
);
}
else
if
(
recom_number
[
i
]
<=
40
)
{
$
(
'#accumulate_section'
).
append
(
'<div class="output c4">'
+
recom_number
[
i
]
+
'</div>'
);
}
else
{
$
(
'#accumulate_section'
).
append
(
'<div class="output c5">'
+
recom_number
[
i
]
+
'</div>'
);
}
}
}
function
resets
()
{
$
(
'#lottotable'
).
html
(
""
);
//초기화
$
(
'#accumulate_table'
).
html
(
""
);
//초기화
$
(
'#recom_table'
).
html
(
""
);
$
(
'#stats'
).
html
(
""
);
for
(
i
=
0
;
i
<
45
;
i
++
){
acum_list
[
i
]
=
0
;
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment