diff --git a/backend/MemeBE/Program.cs b/backend/MemeBE/Program.cs index 5df31d8..5462b3e 100644 --- a/backend/MemeBE/Program.cs +++ b/backend/MemeBE/Program.cs @@ -13,7 +13,7 @@ { options.AddPolicy("MyCorsPolicy", builder => { - builder.WithOrigins("https://nice-water-0ee9aa403.4.azurestaticapps.net", "http://localhost:63342", "https://memethegathering.wielki.ch") // URL innego serwera + builder.WithOrigins("https://nice-water-0ee9aa403.4.azurestaticapps.net", "http://localhost:63342", "https://memethegathering.wielki.ch", "https://mtg.wielki.ch/") // URL innego serwera .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials(); // Ważne dla SignalR diff --git a/backend/MemeBE/cards.csv b/backend/MemeBE/cards.csv index 0312fe6..69a234d 100644 --- a/backend/MemeBE/cards.csv +++ b/backend/MemeBE/cards.csv @@ -27,4 +27,14 @@ 27;SurprisedPikachu;/static/jpg/SurprisedPikachu.png;MakeLaugh,1;1 28;SurprisedKirk;/static/jpg/SurprisedKirk.png;MakeLaugh,2;0 29;Takemymoney;/static/jpg/Takemymoney.png;MakeLaugh,2;1 -30;RollSafeThink;/static/jpg/OhGodNo.png;Shield,1;2 \ No newline at end of file +30;RollSafeThink;/static/jpg/OhGodNo.png;Shield,1;2 +31;Thatsnoneofmybuisness;/static/jpg/Thatsnoneofmybuisness.png;MakeLaugh,1;1 +32;TheWhat;/static/jpg/TheWhat.png;MakeLaugh,2;1 +33;Thisisfine;/static/jpg/Thisisfine.png;MakeLaugh,1;1 +34;TrollFace;/static/jpg/TrollFace.png;MakeGrumpy,1;0 +35;TrueStory;/static/jpg/TrueStory.png;MakeGrumpy,1;0 +36;WakingUp;/static/jpg/WakingUp.png;MakeLaugh,3;0 +37;Watlady;/static/jpg/Watlady.png;MakeGrumpy,1;1 +38;WeedGuy;/static/jpg/WeedGuy.png;MakeLaugh,1;1 +39;WillyWonka;/static/jpg/WillyWonka.png;MakeLaugh,1;1 +40;Duckface;/static/jpg/Duckface.png;MakeGrumpy,1;1 diff --git a/backend/MemeBE/hubs/GameHub.cs b/backend/MemeBE/hubs/GameHub.cs index 9177f9d..0935e5b 100644 --- a/backend/MemeBE/hubs/GameHub.cs +++ b/backend/MemeBE/hubs/GameHub.cs @@ -317,9 +317,12 @@ await Clients.Group(room.RoomId) public async Task MakeGrumpy(Room room, int value, string? targetNick = null) { + Console.WriteLine("MakeGrumpy - invoke"); int grumpyValue = room.ActivePlayer.PrepareGrumpy(value, out List cardsToDelete); + Console.WriteLine("Grumpy Value: " + grumpyValue); if (string.IsNullOrEmpty(targetNick)) // all players { + Console.WriteLine("MakeGrumpy - To All"); foreach (var player in room.Players.Values) { player.ReceiveGrumpy(grumpyValue); @@ -336,6 +339,7 @@ await Clients.Group(room.RoomId) } else // Single player { + Console.WriteLine("MakeGrumpy - To target"); var targetPlayer = room.GetPlayerByNick(targetNick); targetPlayer.ReceiveGrumpy(grumpyValue); // emit diff --git a/client/static/jpg/Duckface.png b/client/static/jpg/Duckface.png new file mode 100644 index 0000000..dae4a55 Binary files /dev/null and b/client/static/jpg/Duckface.png differ diff --git a/client/static/jpg/Thatsnoneofmybuisness.png b/client/static/jpg/Thatsnoneofmybuisness.png new file mode 100644 index 0000000..71a44ec Binary files /dev/null and b/client/static/jpg/Thatsnoneofmybuisness.png differ diff --git a/client/static/jpg/TheWhat.png b/client/static/jpg/TheWhat.png new file mode 100644 index 0000000..4f1f831 Binary files /dev/null and b/client/static/jpg/TheWhat.png differ diff --git a/client/static/jpg/Thisisfine.png b/client/static/jpg/Thisisfine.png new file mode 100644 index 0000000..7f277ca Binary files /dev/null and b/client/static/jpg/Thisisfine.png differ diff --git a/client/static/jpg/TrollFace.png b/client/static/jpg/TrollFace.png new file mode 100644 index 0000000..79765d8 Binary files /dev/null and b/client/static/jpg/TrollFace.png differ diff --git a/client/static/jpg/TrueStory.png b/client/static/jpg/TrueStory.png new file mode 100644 index 0000000..665e572 Binary files /dev/null and b/client/static/jpg/TrueStory.png differ diff --git a/client/static/jpg/WakingUp.png b/client/static/jpg/WakingUp.png new file mode 100644 index 0000000..7840543 Binary files /dev/null and b/client/static/jpg/WakingUp.png differ diff --git a/client/static/jpg/Watlady.png b/client/static/jpg/Watlady.png new file mode 100644 index 0000000..6ed5b67 Binary files /dev/null and b/client/static/jpg/Watlady.png differ diff --git a/client/static/jpg/WeedGuy.png b/client/static/jpg/WeedGuy.png new file mode 100644 index 0000000..edd41e7 Binary files /dev/null and b/client/static/jpg/WeedGuy.png differ diff --git a/client/static/jpg/WillyWonka.png b/client/static/jpg/WillyWonka.png new file mode 100644 index 0000000..d0f9c1d Binary files /dev/null and b/client/static/jpg/WillyWonka.png differ diff --git a/client/static/js/main.js b/client/static/js/main.js index 6fd4e01..52b98fe 100644 --- a/client/static/js/main.js +++ b/client/static/js/main.js @@ -12,8 +12,8 @@ $(document).ready(function () { function initServer() { connection = new signalR.HubConnectionBuilder() - .withUrl("https://memethegatheringapi.azurewebsites.net/GameHub") - // .withUrl("https://578d-87-206-130-93.ngrok-free.app/GameHub") + //.withUrl("https://memethegatheringapi.azurewebsites.net/GameHub") + .withUrl("https://578d-87-206-130-93.ngrok-free.app/GameHub") .withAutomaticReconnect() .configureLogging(signalR.LogLevel.Information) .build();