public Vector3 GetPositionFromIntent(TicTacToeIntent intent) { Vector3 position = new Vector3(0, 0.5f, 0); switch (intent) { case TicTacToeIntent.Tile0: position.x = 0; position.z = 2; break; case TicTacToeIntent.Tile1: position.x = 1; position.z = 2; break; case TicTacToeIntent.Tile2: position.x = 2; position.z = 2; break; case TicTacToeIntent.Tile3: position.x = 0; position.z = 1; break; case TicTacToeIntent.Tile4: position.x = 1; position.z = 1; break; case TicTacToeIntent.Tile5: position.x = 2; position.z = 1; break; case TicTacToeIntent.Tile6: position.x = 0; position.z = 0; break; case TicTacToeIntent.Tile7: position.x = 1; position.z = 0; break; case TicTacToeIntent.Tile8: position.x = 2; position.z = 0; break; } return(position); }
public bool ProcessIntent(TicTacToeIntent wantedIntent) { Debug.Log("Process intent to " + wantedIntent); return(Place(circle, GetPositionFromIntent(wantedIntent), circleGridMaterial, Cell.CellTicTacToeType.Circle)); }