mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 15:16:33 -08:00
Bowling in csharp
This commit is contained in:
23
14_Bowling/csharp/FrameResult.cs
Normal file
23
14_Bowling/csharp/FrameResult.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bowling
|
||||
{
|
||||
public class FrameResult
|
||||
{
|
||||
public enum Points { None, Error, Spare, Strike };
|
||||
|
||||
public int PinsBall1 { get; set; }
|
||||
public int PinsBall2 { get; set; }
|
||||
public Points Score { get; set; }
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
PinsBall1 = PinsBall2 = 0;
|
||||
Score = Points.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user