♻️ Rename folders appropriately, add ILoader, fix smells

pull/54/head
Alexis Drai 2 years ago
parent c88851af6e
commit c005e84d51

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
namespace Data
{
public interface ILoader
{
public GameRunner LoadApp();
}
}

@ -1,10 +1,22 @@
using Model;
using Data;
using Model;
namespace Stub
{
public class Stub
public class Stub : ILoader
{
public List<Player> LoadPlayers()
// when the other classes are ready
// the Stub should just make and return a GameRunner, and the GameRunner should have
// a PlayerManager, a collection of Games, a FavGroupManager, etc. (see diagram)
public GameRunner LoadApp()
{
// this doesn't do much for now, because the class isn't coded
return new GameRunner();
}
public static List<Player> LoadPlayers()
{
List<Player> list = new()
{
@ -18,7 +30,7 @@ namespace Stub
return list;
}
public List<Die> LoadDices()
public static List<Die> LoadDices()
{
List<Die> list = new()
{
@ -33,7 +45,7 @@ namespace Stub
return list;
}
public List<NumberDieFace> LoadNumFaces()
public static List<NumberDieFace> LoadNumFaces()
{
List<NumberDieFace> list = new()
{
@ -49,7 +61,7 @@ namespace Stub
return list;
}
public List<ColorDieFace> LoadClrFaces()
public static List<ColorDieFace> LoadClrFaces()
{
List<ColorDieFace> list = new()
{
@ -65,7 +77,7 @@ namespace Stub
return list;
}
public List<ImageDieFace> LoadImgFaces()
public static List<ImageDieFace> LoadImgFaces()
{
List<ImageDieFace> list = new()
{

@ -12,7 +12,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{8
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{11BDDDA8-CBED-46EE-A224-144C3CD545A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stub", "Stub\Stub.csproj", "{3047BFD8-EF44-4095-9E54-45D47C7AB212}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Data", "Stub\Data.csproj", "{3047BFD8-EF44-4095-9E54-45D47C7AB212}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Loading…
Cancel
Save