-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTurn.cs
57 lines (51 loc) · 1.21 KB
/
Turn.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System.Collections.Generic;
using System.Drawing;
namespace YINSH
{
public class Turn
{
private static Turn Instance = null;
public static Turn GetInstance()
{
if (Instance == null)
{
Instance = new Turn();
}
return Instance;
}
#region 변수
/// <summary>
/// YINSH Player White & Black
/// </summary>
/// 턴 총 합계
/// 현재 플레이어
/// 턴 확인
/// 컴포넌트 넘기기
public List<Color> Player = new List<Color>();
public int Count;
public int User;
public bool Check;
#endregion
#region 함수
public void Setting()
{
Player.Clear();
Player.Add(Color.White);
Player.Add(Color.Black);
Count = 1;
User = 0;
Check = false;
}
public void System()
{
if (Check == true)
{
Count++;
User++;
User = (User >= Player.Count) ? 0 : User;
Check = false;
}
}
#endregion
}
}