Skip to content

Refactoring - code extraction #2

Description

@dawciobiel

Code can be extracted to private method.
https://github.com/Foxfnaf/TicTacToe/blob/f1b384f58dfbb626cc3a47fe2ee66a24301e0c81/src/main/java/org/example/TicTacToe.java#L58

to:
if (isFieldOccupated(aiAnswear)) (...)

private isFieldOccupated(int fieldNumber) {
  return ((board.get(aiAnswear).equals("o") || board.get(aiAnswear).equals("x")));
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions