public static void Move(piece piece, int roll) { int index = piece.Index + roll; //Removes the piece on the board. board[index].removePiece(); //Checks if the board is empty if (board[index].Count > 0 || board[index].BoardPiece.Color == piece.Color) { board[index].AddPiece(piece); } else { if (board[index].Special == "globe") { piece.Home = true; } else if (board[index].Count >= 2) { piece.Home = true; } else { board[index].BoardPiece.Home = true; } } }
public team(string color, bool human, int id) { Id = id; Color = color; Human = human; Points = 0; for (int i = 0; i < 4; i++) { Pieces[i] = new piece(13 * id + 2, i, Color); } }
public void AddPiece(piece number1) { BoardPiece = number1; Count++; }