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

Kurt sprint 5 #3

Closed
wants to merge 3 commits into from
Closed
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
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.
Loading