Skip to content

Added TicTacToe#3

Open
dkaznacheev wants to merge 5 commits intomasterfrom
TicTacToe
Open

Added TicTacToe#3
dkaznacheev wants to merge 5 commits intomasterfrom
TicTacToe

Conversation

@dkaznacheev
Copy link
Copy Markdown
Owner

No description provided.

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Copy Markdown

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);
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private? -1

Copy link
Copy Markdown
Owner Author

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();
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще, бот мог бы быть и поумнее

@dzharkov
Copy link
Copy Markdown

Красный билд на тревисе, -1

@dzharkov
Copy link
Copy Markdown

Ок, 10/10

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants