You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
928 B
47 lines
928 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Model
|
|
{
|
|
class Game
|
|
{
|
|
public string name;
|
|
|
|
public Game(string name)
|
|
{
|
|
this.name = name;
|
|
}
|
|
|
|
public List<Die> listDice = new List<Die>();
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
return name;
|
|
|
|
}
|
|
set
|
|
{
|
|
//Indique si une chaîne spécifiée est null, vide ou se compose uniquement d'espaces blancs
|
|
if (string.IsNullOrWhiteSpace(value))
|
|
{
|
|
throw new ArgumentException("Enter a name", nameof(value));
|
|
}
|
|
name = value;
|
|
}
|
|
}
|
|
|
|
public void AddDice(Die die)
|
|
{
|
|
listDice.Add(die);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|