ajout class NumberDie et Die

pull/3/head
najlae.LAMBARAA 3 years ago
parent aa2bcef3a2
commit 9213573d8b

@ -3,7 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{2CC2AF2A-F6B6-44BF-A1C2-710575725F6B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2CC2AF2A-F6B6-44BF-A1C2-710575725F6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2CC2AF2A-F6B6-44BF-A1C2-710575725F6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2CC2AF2A-F6B6-44BF-A1C2-710575725F6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2CC2AF2A-F6B6-44BF-A1C2-710575725F6B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection

@ -0,0 +1,15 @@
namespace Model
{
public abstract class Die
{
private String name ;
public Die(String name)
{
this.name = name;
}
public abstract void RandomFace();
}
}

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class NumberDie : Die
{
private int min;
private int max;
private Random random=new Random();
public NumberDie(string name) : base(name)
{
}
public override void RandomFace()
{
int value=random.Next(min,max+1);
}
}
}

@ -0,0 +1,8 @@
using System;
public class Class1
{
public Class1()
{
}
}
Loading…
Cancel
Save