using System.Collections.Generic;
private string userPassword;
public User(string name, string password)
this.userPassword = password;
public string GetUserName { get { return userName; } }
private Random rand = new Random();
private List<int> rolls = new List<int>();
this.result = this.Result(this.rolls.Last());
while(this.result == "point");
public List<int> GetRolls { get { return rolls; } }
public int GetPoint { get { return point; } }
public string GetResult { get { return result; } }
this.rolls.Add(this.rand.Next(1, 7) + this.rand.Next(1, 7));
private string Result(int sum)
if(this.rolls.Count == 1)
if(sum == 7) { return "loss"; }
else if(sum == this.point) { return "win"; }
public static void Main()
Craps game = new Craps();
Console.WriteLine("\nResult: " + game.GetResult);