-
Notifications
You must be signed in to change notification settings - Fork 0
Added TicTacToe #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
TicTacToe/.idea/compiler.xml
Outdated
| @@ -0,0 +1,23 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В чем смысл хранения .idea в репозитории для гредл проекта? Пока -2
| * @param board current board | ||
| * @return point where the turn is made | ||
| */ | ||
| Point makeTurn(BoardState[][] board); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Правильней все-таки вместо массива сделать отдельный класс для всей доски.
Пока -1 за отсутствие инкапсуляции
| @FXML | ||
| private Text label; | ||
| @FXML | ||
| private Button button00; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давайте попробуем избавиться от статично заданных кнопок и сделать так, чтобы было несложно изменить размер поля. Пока -0.5
| * @param column column of a turn | ||
| * @return winning player | ||
| */ | ||
| public PlayerType processTurn(int row, int column) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private? -1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А почему private? Вроде это метод для общения с моделью снаружи. Говорим в модель, какой сделали ход, получаем ответ, кто выиграл
| */ | ||
| private boolean firstTurn = true; | ||
|
|
||
| private Random random = new Random(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final?
| } else { | ||
| int row, column; | ||
| do { | ||
| row = Math.abs(random.nextInt()) % BOARD_SIZE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще, бот мог бы быть и поумнее
|
Красный билд на тревисе, -1 |
|
Ок, 10/10 |
No description provided.