Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
M
mangala-pardusacikhack
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Tuğba Fıçıcı
mangala-pardusacikhack
Commits
094b5458
Kaydet (Commit)
094b5458
authored
May 05, 2021
tarafından
Muaz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Hard seviye eklendi.
Yeni zorluk seviyesi Hard eklendi.
üst
23dba29f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
14 deletions
+36
-14
robotGameArea.html
pages/robotGameArea.html
+3
-0
robotGameArea.js
pages/robotGameArea.js
+33
-14
No files found.
pages/robotGameArea.html
Dosyayı görüntüle @
094b5458
...
...
@@ -10,6 +10,9 @@
<body>
<div
class=
"container"
>
<div
id=
"overlay"
onclick=
"overlayOff()"
>
<div
id=
"text"
>
Bitti
</div>
</div>
<div
id=
"user1hole7"
class=
"rectangle"
>
hazine
</div>
<div
class=
"circle_container"
>
<div
class=
"circle_wrap"
>
...
...
pages/robotGameArea.js
Dosyayı görüntüle @
094b5458
// Zorluk Dereceleri:
// 1: Easy
// 2: Medium
// 3: Hard
const
zorlukDerecesi
=
2
;
class
Hole
{
...
...
@@ -14,11 +18,12 @@ class Hole {
}
}
var
robotMedium
=
0
;
async
function
wait
(
x
)
{
setTimeout
(()
=>
{
console
.
log
(
"Done waiting"
);
if
(
zorlukDerecesi
==
1
){
if
(
zorlukDerecesi
==
1
||
zorlukDerecesi
==
2
){
robotEasy
();
}
...
...
@@ -66,21 +71,23 @@ function tikla(id){
dagit
(
Number
(
id
[
4
]),
Number
(
id
[
9
]));
boncukCiz
();
if
(
zorlukDerecesi
==
2
){
if
(
zorlukDerecesi
==
3
){
while
(
player
==
1
){
robot
Medium
();
robot
Hard
();
}
}
else
if
(
zorlukDerecesi
==
2
&&
robotMedium
%
3
==
1
){
robotMedium
+=
1
;
while
(
player
==
1
){
robotHard
();
}
}
else
{
robotMedium
+=
1
;
if
(
player
==
1
){
wait
(
2000
);
}
}
}
}
...
...
@@ -294,6 +301,7 @@ function boncukCiz(){
function
robotEasy
(){
// player 1 i kontrol eden robot
console
.
log
(
"EEEEasy calisti."
);
let
array
=
doluHoleler
();
let
len
=
array
.
length
;
if
(
len
>
0
){
...
...
@@ -301,8 +309,8 @@ function robotEasy(){
tikla
(
"user1hole"
+
(
array
[
holeID
]
+
1
).
toString
()
+
"x"
);
}
}
function
robotMedium
(){
function
robotHard
(){
console
.
log
(
"HHHHARD calisti."
);
let
array
=
doluHoleler
();
let
len
=
array
.
length
;
let
score_ar
=
[];
// dolu hucrelerle ayni indisle
...
...
@@ -318,7 +326,7 @@ function robotMedium(){
console
.
log
(
"ilk bosalt sonrasi user2hole uzunnlugu: "
,
user2hole
.
length
);
/*
console.log("robot
Medium
hesaplama basliyor..");
console.log("robot
Hard
hesaplama basliyor..");
console.log("temp1[0].value: ", temp1[0].value);
console.log("user1hole[0].value: ", user1hole[0].value);
console.log("atamar yapiliyor..");
...
...
@@ -412,4 +420,15 @@ function drop(ev) {
var
data
=
ev
.
dataTransfer
.
getData
(
"text"
);
ev
.
target
.
appendChild
(
document
.
getElementById
(
data
));
counterDown
();
}
\ No newline at end of file
}
//overlay ac kapa
function
overlay
()
{
document
.
getElementById
(
"overlay"
).
style
.
display
=
"block"
;
}
function
overlayOff
()
{
document
.
getElementById
(
"overlay"
).
style
.
display
=
"none"
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment