From 9d94b5661acb558db1ee5e06d019293bb6acdcd5 Mon Sep 17 00:00:00 2001
From: lancelot <jouault.lancelot@gmail.com>
Date: Sat, 24 Jun 2023 18:22:00 +0200
Subject: [PATCH] correction bug sur la connect avec windows check faut
 maintenant check sur linux

---
 .DS_Store      | Bin 6148 -> 0 bytes
 Game/game.py   |   2 +-
 Game/server.py |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 .DS_Store

diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index c657cecc1ac3ff4edf629e4954a0dbb3952e01d5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 6148
zcmZQzU|@7AO)+F(5MW?n;9!8zOq>i@0Z1N%F(jFwB5WY@z-E*%6epDz7bNB6Cqd;#
zslgorptxgWNMtBxC}v1yK#jj0Nd-BX#U%y?*BF_YSy<WFIoLV4Ibwq|^2>uu5=%;p
zof3<pLA;Rs{G22hJ25FNGqpTkK*TveuOu-uFSQ7yBseoAH7T(uCOk7QCBNJ$zceqU
z7_1j6!NJMF880AFU2S4yqNAW|XjZGEP;F^ptfOFNW?Eaz$sww&Zygk$os*lF-vtR$
zMn(wDzzd~eR5t?y1B#z=(hY-?^K%Pe3ee?q^Icq^X_n(;i&;p7#8F2~H7Nwu6lCDH
zr!2TAFDE}Q9g<&=Tr<iX4S~@R7!3jXh5)qu<lv^SwWGF;hQMeD41o{;l@AKgwu%Fk
zZh+7rDF#Lc25=XEk%55)<{d_GKY#%w2hs|nL0UmHNGk&)hy^wStd)Tgs+AGk4FTx`
zbxA-pSUUqF16Vr)BLi4F1FX@<2+_{K2(_6J+CyQ4XlG!AXlG!AXoop(lpYO%(GY-!
z05gOZ0M-Al3=FvX{}5H9<Y)+thQP240Y(;=U>7HFrHtKwpt=@RpC&-1LA5`qI%Wjb
q(+DweRm=n#P?UfQgQ|OwRuB!YiWwOoHTh^m02V@{^k@jsKLh}${b{NI

diff --git a/Game/game.py b/Game/game.py
index cb83eac..d656961 100644
--- a/Game/game.py
+++ b/Game/game.py
@@ -109,7 +109,7 @@ class Game :
         
         try:
             if platform.system() == "Windows":
-                hoteJoin = '127.0.0.1'
+                hoteJoin = self.server.getPublicIp()
             else:
                 hoteJoin = self.server.HOTE
             self.clientSocket.sendto(pickle.dumps(self.player), ((hoteJoin, self.server.PORT)))
diff --git a/Game/server.py b/Game/server.py
index d61af01..88ab17f 100644
--- a/Game/server.py
+++ b/Game/server.py
@@ -34,7 +34,7 @@ class Server :
     socket : socket
 
     # Constructeur d'initalisation
-    def __init__(self,hote :str = "0.0.0.0",port : int = 8080,hote_player :player.Player = None, debug : bool = False ):
+    def __init__(self,hote :str = socket.gethostbyname(socket.gethostname()),port : int = 8080,hote_player :player.Player = None, debug : bool = False ):
         if hote == None :
             self.HOTE : str = self.getPublicIp()
         else :
-- 
GitLab