Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint 5 #5

Merged
merged 10 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions Pong/Controllers/PongController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,15 @@ public class PongController : ControllerBase
private static readonly List<GameInfo> TheInfo = new List<GameInfo>
{
new GameInfo {
//Id = 1,
Title = "Snake",
//Content = "~/js/snake.js",
Author = "Fall 2023 Semester",
DateAdded = "",
Description = "Snake is a classic arcade game that challenges the player to control a snake-like creature that grows longer as it eats apples. The player must avoid hitting the walls or the snake's own body, which can end the game.\r\n",
HowTo = "Control with arrow keys.",
//Thumbnail = "/images/snake.jpg" //640x360 resolution
},
new GameInfo {
//Id = 2,
Title = "Tetris",
//Content = "~/js/tetris.js",
Author = "Fall 2023 Semester",
DateAdded = "",
Description = "Tetris is a classic arcade puzzle game where the player has to arrange falling blocks, also known as Tetronimos, of different shapes and colors to form complete rows on the bottom of the screen. The game gets faster and harder as the player progresses, and ends when the Tetronimos reach the top of the screen.",
HowTo = "Control with arrow keys: Up arrow to spin, down to speed up fall, space to insta-drop.",
//Thumbnail = "/images/tetris.jpg"
},
new GameInfo {
//Id = 3,
Id = 3,
Title = "Pong",
//Content = "~/js/pong.js",
Content = "~/js/pong.js",
Author = "Fall 2023 Semester",
DateAdded = "",
Description = "Pong is a classic arcade game where the player uses a paddle to hit a ball against a computer's paddle. Either party scores when the ball makes it past the opponent's paddle.",
HowTo = "Control with arrow keys.",
//Thumbnail = "/images/pong.jpg"
},
Thumbnail = "/images/pong.jpg"
}

};

Expand Down
12 changes: 6 additions & 6 deletions Pong/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["GameMicroServer/GameMicroServer.csproj", "GameMicroServer/"]
RUN dotnet restore "GameMicroServer/GameMicroServer.csproj"
COPY ["Pong/Pong.csproj", "PongMicroService/"]
RUN dotnet restore "PongMicroService/Pong.csproj"
COPY . .
WORKDIR "/src/GameMicroServer"
RUN dotnet build "GameMicroServer.csproj" -c Release -o /app/build
WORKDIR "/src/Pong"
RUN dotnet build "Pong.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "GameMicroServer.csproj" -c Release -o /app/publish /p:UseAppHost=false
RUN dotnet publish "Pong.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "GameMicroServer.dll"]
ENTRYPOINT ["dotnet", "Pong.dll"]
5 changes: 4 additions & 1 deletion Pong/GameInfo.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
namespace Pong
namespace Pong
{
public class GameInfo
{
public int Id { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public string Content { get; set; }
public string Description { get; set; }
public string DateAdded { get; set; }
public string HowTo { get; set; }
public string Thumbnail { get; set; }
}
}
Loading