Add project files.
This commit is contained in:
28
WinGreed/Dice.cs
Normal file
28
WinGreed/Dice.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WinGreed
|
||||
{
|
||||
public class Dice
|
||||
{
|
||||
public bool Chosen { get; set; } = false;
|
||||
public int Number { get; set; }
|
||||
public int DiceNumber { get; set; }
|
||||
private Random rnd = null;
|
||||
public Dice(int diceNumber)
|
||||
{
|
||||
rnd = new Random();
|
||||
DiceNumber = diceNumber;
|
||||
}
|
||||
|
||||
|
||||
public int Roll()
|
||||
{
|
||||
Number = rnd.Next(1, 7);
|
||||
return Number;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user