-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
90 additions
and
64 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/ru/hse/germandilio/tetris/server/game/GameFlow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package ru.hse.germandilio.tetris.server.game; | ||
|
||
import ru.hse.germandilio.tetris.server.clienthandling.Connection; | ||
|
||
public interface GameFlow { | ||
boolean readyToStartGame(); | ||
|
||
void startGame(Connection client); | ||
|
||
boolean readyToEndGame(); | ||
|
||
void endGame(Connection client); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/ru/hse/germandilio/tetris/server/game/GameSessions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ru.hse.germandilio.tetris.server.game; | ||
|
||
import ru.hse.germandilio.tetris.server.clienthandling.Connection; | ||
|
||
public interface GameSessions { | ||
void saveGameSessionResults(Connection client); | ||
|
||
void getTopSessions(Connection client, int topNumber); | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/ru/hse/germandilio/tetris/server/game/PlayerConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ru.hse.germandilio.tetris.server.game; | ||
|
||
import ru.hse.germandilio.tetris.server.clienthandling.CommandSender; | ||
import ru.hse.germandilio.tetris.server.clienthandling.Connection; | ||
|
||
public interface PlayerConnection { | ||
Connection playerConnected(CommandSender clientHandler); | ||
|
||
void disconnectPlayer(Connection client); | ||
} |
59 changes: 34 additions & 25 deletions
59
src/main/resources/ru/hse/germandilio/tetris/client/application/tetris-view.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 15 additions & 13 deletions
28
src/main/resources/ru/hse/germandilio/tetris/client/application/top-results.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
|
||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
|
||
<AnchorPane prefHeight="400.0" prefWidth="650.0" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.hse.germandilio.tetris.client.controllers.TopResultsController"> | ||
<children> | ||
<TableView fx:id="gameResults" layoutX="200.0" layoutY="84.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0"> | ||
<columns> | ||
<TableColumn fx:id="login" prefWidth="170.0" text="Имя игрока" /> | ||
<TableColumn fx:id="endSessionTime" prefWidth="200.0" text="Время окончания игры" /> | ||
<TableColumn fx:id="movesCount" prefWidth="109.0" text="Кол-во фигур" /> | ||
<TableColumn fx:id="sessionDuration" prefWidth="153.0" text="Игровое время" /> | ||
</columns> | ||
</TableView> | ||
</children> | ||
<AnchorPane prefHeight="400.0" prefWidth="650.0" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" | ||
fx:controller="ru.hse.germandilio.tetris.client.controllers.TopResultsController"> | ||
<children> | ||
<TableView fx:id="gameResults" layoutX="200.0" layoutY="84.0" prefHeight="200.0" prefWidth="200.0" | ||
AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" | ||
AnchorPane.topAnchor="10.0"> | ||
<columns> | ||
<TableColumn fx:id="login" prefWidth="170.0" text="Имя игрока"/> | ||
<TableColumn fx:id="endSessionTime" prefWidth="200.0" text="Время окончания игры"/> | ||
<TableColumn fx:id="movesCount" prefWidth="109.0" text="Кол-во фигур"/> | ||
<TableColumn fx:id="sessionDuration" prefWidth="153.0" text="Игровое время"/> | ||
</columns> | ||
</TableView> | ||
</children> | ||
</AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters