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
e64b7278
Kaydet (Commit)
e64b7278
authored
May 07, 2021
tarafından
Abdülkerim AKSAK
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Oyun bittiğinde yeniden oyna işlevi eklendi.
üst
fedf38d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
clientGameArea.js
pages/clientGameArea.js
+18
-4
No files found.
pages/clientGameArea.js
Dosyayı görüntüle @
e64b7278
...
...
@@ -23,7 +23,7 @@ var treasure2 = new Hole(0, "user2hole7");
user1hole
.
push
(
treasure1
);
user2hole
.
push
(
treasure2
);
var
player
=
2
;
waitcolor
=
"#ed664c"
;
//
//
Kırmızı renk beklesin
waitcolor
=
"#ed664c"
;
// Kırmızı renk beklesin
playercolor
=
"#ffe268"
;
// Sarı renk oynasın
waitvisible
=
"visible"
;
playervisible
=
"hidden"
;
...
...
@@ -346,10 +346,15 @@ function overlayOff() {
function
yenidenOyna
()
{
// yeniden oynanmasi icin degiskenleri baslangic konumuna getirir.
player
=
2
;
//
player = 2;
document
.
getElementById
(
"user1"
).
style
.
backgroundColor
=
waitcolor
;
document
.
getElementById
(
"user2"
).
style
.
backgroundColor
=
playercolor
;
//document.getElementById("user1").style.backgroundColor = waitcolor;
//document.getElementById("user2").style.backgroundColor = playercolor;
for
(
var
i
=
1
;
i
<
8
;
i
++
)
{
user1hole
.
pop
();
user2hole
.
pop
();
}
for
(
var
i
=
1
;
i
<
7
;
i
++
)
{
var
hole1
=
new
Hole
(
4
,
"user1hole"
+
i
.
toString
());
...
...
@@ -360,8 +365,13 @@ function yenidenOyna() {
treasure1
=
new
Hole
(
0
,
"user1hole7"
);
treasure2
=
new
Hole
(
0
,
"user2hole7"
);
user1hole
.
push
(
treasure1
);
user2hole
.
push
(
treasure2
);
console
.
log
(
user1hole
);
console
.
log
(
user2hole
);
boncukCiz
();
overlayOff
();
...
...
@@ -431,6 +441,10 @@ function overlayOda() {
let
odayaKatilBtn
=
document
.
getElementById
(
"odayaKatilBtn"
);
let
odayaKatilInput
=
document
.
getElementById
(
"odayaKatilInput"
);
odayaKatilBtn
.
onclick
=
()
=>
{
document
.
getElementById
(
"user1"
).
style
.
backgroundColor
=
playercolor
;
document
.
getElementById
(
"user2"
).
style
.
backgroundColor
=
waitcolor
;
document
.
getElementById
(
"clock1"
).
style
.
visibility
=
waitvisible
;
document
.
getElementById
(
"clock2"
).
style
.
visibility
=
playervisible
;
let
roomKey
=
odayaKatilInput
.
value
;
randomKey
=
roomKey
;
game
.
emit
(
"joinRoom"
,
roomKey
,
name
.
getUsername
());
//username dinamik olmalı!!!!
...
...
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