diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a3d45..ea20329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## v0.2.1b0 (2021-01-22) + +### Fix + +- pop -> peek +- add missing name mapping +- not returning game id after creation +- add missing auth tag +- authentication crash with invald game id +- NullPrt on event +- **autogen**: enable RobotPickEvent + +### Feat + +- implement robot picking/assignment + +### Refactor + +- change accessors +- **autogen**: replace wrongly generated attributes by extending + ## v0.2.1a1 (2021-01-22) ### Fix diff --git a/cz.json b/cz.json index 7672766..533c84d 100644 --- a/cz.json +++ b/cz.json @@ -1 +1 @@ -{"commitizen": {"name": "cz_conventional_commits", "version": "0.2.1a1", "tag_format": "v$major.$minor.$patch$prerelease", "update_changelog_on_bump": true, "version_files": ["oas/game-engine.v1.json", "README.md"]}} \ No newline at end of file +{"commitizen": {"name": "cz_conventional_commits", "version": "0.2.1b0", "tag_format": "v$major.$minor.$patch$prerelease", "update_changelog_on_bump": true, "version_files": ["oas/game-engine.v1.json", "README.md"]}} \ No newline at end of file diff --git a/oas/game-engine.v1.json b/oas/game-engine.v1.json index 773df47..675c9ea 100644 --- a/oas/game-engine.v1.json +++ b/oas/game-engine.v1.json @@ -74,7 +74,14 @@ "operationId": "createGame", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameID" + } + } + } } }, "description": "Creates a random game by your defined rules", diff --git a/server/src/Tgm.Roborally.Server/Attributes/ValidateModelStateAttribute.cs b/server/src/Tgm.Roborally.Server/Attributes/ValidateModelStateAttribute.cs index b3edb99..7c725fc 100644 --- a/server/src/Tgm.Roborally.Server/Attributes/ValidateModelStateAttribute.cs +++ b/server/src/Tgm.Roborally.Server/Attributes/ValidateModelStateAttribute.cs @@ -1,3 +1,4 @@ +using System; using System.ComponentModel.DataAnnotations; using System.Reflection; using Microsoft.AspNetCore.Mvc; diff --git a/server/src/Tgm.Roborally.Server/Engine/Managers/EventManager.cs b/server/src/Tgm.Roborally.Server/Engine/Managers/EventManager.cs index 38c2ad8..811b6f3 100644 --- a/server/src/Tgm.Roborally.Server/Engine/Managers/EventManager.cs +++ b/server/src/Tgm.Roborally.Server/Engine/Managers/EventManager.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Runtime.CompilerServices; using System.Runtime.Intrinsics.X86; using System.Threading; @@ -46,6 +47,7 @@ public Event Pop(int player) { /// /// Wait for the next event /// + [MethodImpl(MethodImplOptions.Synchronized)] public void Await() { Monitor.Wait(locker); } diff --git a/server/src/Tgm.Roborally.Server/Engine/Phases/LobbyPhase.cs b/server/src/Tgm.Roborally.Server/Engine/Phases/LobbyPhase.cs index 00f8f37..281bea3 100644 --- a/server/src/Tgm.Roborally.Server/Engine/Phases/LobbyPhase.cs +++ b/server/src/Tgm.Roborally.Server/Engine/Phases/LobbyPhase.cs @@ -5,7 +5,7 @@ namespace Tgm.Roborally.Server.Engine.Phases { public class LobbyPhase : GamePhase { - private bool started = false; + private bool started; protected override GamePhase Run(GameLogic game){ while (!started){ Thread.Yield();