DO-8 병합 전 커밋
This commit is contained in:
parent
d0f76ff05a
commit
6987ca6376
@ -24,15 +24,12 @@ public class GameLogic : MonoBehaviour
|
||||
lastRow = -1;
|
||||
lastCol = -1;
|
||||
|
||||
SetTurn(Enums.PlayerType.PlayerA);
|
||||
currentTurn = Enums.PlayerType.PlayerA;
|
||||
|
||||
SetState(currentTurn);
|
||||
}
|
||||
|
||||
private void SetState()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void SetTurn(Enums.PlayerType player)
|
||||
private void SetState(Enums.PlayerType player)
|
||||
{
|
||||
currentTurn = player;
|
||||
_stoneController.OnStoneClickedDelegate = (row, col) =>
|
||||
@ -60,14 +57,21 @@ public class GameLogic : MonoBehaviour
|
||||
_stoneController.SetStoneType(Enums.StoneType.Black, row, col);
|
||||
_stoneController.SetStoneState(Enums.StoneState.LastPositioned, row, col);
|
||||
_board[row, col] = Enums.PlayerType.PlayerA;
|
||||
LastNSelectedSetting(row, col);
|
||||
}
|
||||
if (playerType == Enums.PlayerType.PlayerB)
|
||||
{
|
||||
_stoneController.SetStoneType(Enums.StoneType.White, row, col);
|
||||
_stoneController.SetStoneState(Enums.StoneState.LastPositioned, row, col);
|
||||
_board[row, col] = Enums.PlayerType.PlayerB;
|
||||
|
||||
LastNSelectedSetting(row, col);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LastNSelectedSetting(int row, int col)
|
||||
{
|
||||
//첫수 확인
|
||||
if (lastRow != -1 || lastCol != -1)
|
||||
{
|
||||
@ -80,7 +84,6 @@ public class GameLogic : MonoBehaviour
|
||||
selectedRow = -1;
|
||||
selectedCol = -1;
|
||||
}
|
||||
}
|
||||
|
||||
//스톤의 상태변경 명령함수
|
||||
private void SetStoneNewState(Enums.StoneState state, int row, int col)
|
||||
|
Loading…
x
Reference in New Issue
Block a user