public async Task MakeMoveAsync() { string[] move = moveString.Split(','); int row = int.Parse(move[0]); int col = int.Parse(move[1]); matrix[row, col] = chessman; string saveValue = chessman.ToString() + moveCount.ToString(); moveCount++; await Helper.AddMoveAsync(storedGameId, chessman == Chessman.X? "X" : "O", col, row); }
/// <summary> /// To be called if this script is attached to a chessman. /// </summary> private void HandleChessmen() { //snap to grid and select sprite if (chessman != null) { //add self to hashset allChessmen.Add(gameObject); //snap to grid, update sprite and name SnapToGrid(chessman); chessman.SelectSprite(); chessman.name = chessman.ToString(); if (clobberClones) { HandleDuplicateChessmen(); //let's see if this works. } } }