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
4f210e19
Kaydet (Commit)
4f210e19
authored
May 07, 2021
tarafından
Tuğba Fıçıcı
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Client-Server kullanıcı adı işlemleri yapıldı.
üst
f9f2f386
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
data.json
data.json
+2
-2
clientGameArea.js
pages/clientGameArea.js
+7
-3
settings.js
pages/settings.js
+4
-0
No files found.
data.json
Dosyayı görüntüle @
4f210e19
{
"user_name"
:
"Haydutdfdf"
,
"score_list"
:[],
"zorluk_setting"
:
"Cengaver"
}
\ No newline at end of file
{
"user_name"
:
"Haydut"
,
"score_list"
:[],
"zorluk_setting"
:
"Kolay"
}
\ No newline at end of file
pages/clientGameArea.js
Dosyayı görüntüle @
4f210e19
...
...
@@ -367,6 +367,7 @@ function yenidenOyna() {
overlayOff
();
}
const
{
desktopCapturer
}
=
require
(
"electron"
);
// SERVER İLETİŞİM
//client
const
io
=
require
(
"socket.io-client"
);
...
...
@@ -375,8 +376,11 @@ const io = require("socket.io-client");
let
game
=
io
.
connect
(
"https://mangala-server.herokuapp.com/game"
);
//let game = io.connect("http://localhost:3000/game");
const
username
=
"Kerim"
;
//username cekme
const
name
=
require
(
"./settings.js"
);
const
username
=
name
.
getUsername
();
console
.
log
(
name
.
getUsername
());
// server kontrol
game
.
on
(
"welcome"
,
(
data
)
=>
{
console
.
log
(
data
);
...
...
@@ -427,7 +431,7 @@ function overlayOda() {
odayaKatilBtn
.
onclick
=
()
=>
{
let
roomKey
=
odayaKatilInput
.
value
;
randomKey
=
roomKey
;
game
.
emit
(
"joinRoom"
,
roomKey
,
"Muaz"
);
//username dinamik olmalı!!!!
game
.
emit
(
"joinRoom"
,
roomKey
,
name
.
getUsername
()
);
//username dinamik olmalı!!!!
let
elemt5
=
document
.
createElement
(
"p"
);
game
.
on
(
"success"
,
(
roomKey
)
=>
{
elemt5
.
textContent
=
"Oda numarası: "
+
roomKey
;
...
...
@@ -467,7 +471,7 @@ function sendMessage(userHoleID) {
//let msg = input.value;
let
msg
=
userHoleID
;
//input.value = "";
game
.
emit
(
"newMsg"
,
"Muaz"
,
msg
,
randomKey
);
// username dinamik olmalı!!!!
game
.
emit
(
"newMsg"
,
name
.
getUsername
()
,
msg
,
randomKey
);
// username dinamik olmalı!!!!
}
// MESAJI ALMA <OdaOlustur>
...
...
pages/settings.js
Dosyayı görüntüle @
4f210e19
...
...
@@ -134,3 +134,6 @@ function updateSetting(isim,zorluk){
writeData
(
data
);
}
module
.
exports
=
{
getUsername
}
\ 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