Skip to content

Commit

Permalink
Merge pull request #4 from Redacted-Team/kurt-sprint-5
Browse files Browse the repository at this point in the history
Kurt sprint 5
  • Loading branch information
cpshahan authored Apr 18, 2024
2 parents cbfafd6 + a097365 commit adc93ef
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 66 deletions.
65 changes: 0 additions & 65 deletions GameMicroServer/Controllers/PongController.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Pong.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34221.43
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pong", "GameMicroServer\Pong.csproj", "{C8787DE3-73A1-4FA9-BC23-865FCF0560AF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pong", "Pong\Pong.csproj", "{C8787DE3-73A1-4FA9-BC23-865FCF0560AF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
45 changes: 45 additions & 0 deletions Pong/Controllers/PongController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

using Microsoft.Extensions.Caching.Distributed;
using System.Text.Json;

namespace Pong
{
[ApiController]
[Route("[controller]")]
public class PongController : ControllerBase
{
private static readonly List<GameInfo> TheInfo = new List<GameInfo>
{
new GameInfo {
Id = 3,
Title = "Pong",
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"
}

};

private readonly ILogger<PongController> _logger;

public PongController(ILogger<PongController> logger)
{
_logger = logger;
}

[HttpGet]
public IEnumerable<GameInfo> Get()
{
return TheInfo;
}
}
}
File renamed without changes.
3 changes: 3 additions & 0 deletions GameMicroServer/GameInfo.cs → Pong/GameInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
{
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; }
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit adc93ef

Please sign in to comment.