Add tests to test-project
This commit is contained in:
18
test-project/Assets/Scripts/BasicCounter.cs
Normal file
18
test-project/Assets/Scripts/BasicCounter.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
public class BasicCounter
|
||||
{
|
||||
public const int MaxCount = 10;
|
||||
|
||||
public BasicCounter(int count = 0)
|
||||
{
|
||||
Count = count;
|
||||
}
|
||||
|
||||
public void Increment()
|
||||
{
|
||||
Count = Math.Min(MaxCount, Count + 1);
|
||||
}
|
||||
|
||||
public int Count { get; private set; }
|
||||
}
|
||||
Reference in New Issue
Block a user