Package-level declarations

Properties

Link copied to clipboard
const val GHOST_PIECE_ALPHA: Float = 0.5f

Transparency level for ghost pieces showing potential moves.

Functions

Link copied to clipboard
@Composable
fun ReversiScope.cellView(coordinate: Coordinate, piece: Piece?, freeze: Boolean = false, modifier: Modifier = Modifier, radiusModifier: Float = 1.0f, alphaModifier: Float = 1.0f, onClick: (coordinate: Coordinate) -> Unit)
Link copied to clipboard
@Composable
fun ReversiScope.DrawBoard(target: Boolean, gameState: GameState, modifier: Modifier = Modifier, freeze: Boolean = false, getAvailablePlays: () -> List<Coordinate>, onCellClick: (coordinate: Coordinate) -> Unit)

Composable rendering the interactive Reversi game board. Displays the grid, pieces, and available moves (if target mode is enabled). Handles user clicks for piece placement with click blocking during animations.

Link copied to clipboard
private fun drawPiece(radius: Float, center: Offset, color: Color, drawScope: DrawScope)
Link copied to clipboard
@Composable
fun ReversiScope.Grid(target: Boolean, gameState: GameState, modifier: Modifier = Modifier, freeze: Boolean = false, getAvailablePlays: () -> List<Coordinate>, onCellClick: (coordinate: Coordinate) -> Unit)

Renders the board grid with cells, pieces, and animated indicators for valid moves. Supports animation feedback for available moves in target mode.

Link copied to clipboard
@Composable
private fun ReversiScope.MissingPlayerRow(type: PieceType)
Link copied to clipboard
@Composable
fun ReversiScope.PassButton(modifier: Modifier = Modifier, canPass: Boolean, freeze: Boolean, onClick: () -> Unit)

Button to pass the current player's turn.

Link copied to clipboard
@Composable
private fun ReversiScope.PlayerScoreRow(player: Player, points: Int, isTurn: Boolean, isWinner: Boolean, modifier: Modifier = Modifier)
Link copied to clipboard
@Composable
fun ReversiScope.TargetButton(target: Boolean, modifier: Modifier = Modifier, freeze: Boolean, onClick: () -> Unit)

Toggle button for target mode, showing available moves on the board. Displays "Target ON" or "Target OFF" based on the current state.

Link copied to clipboard

Creates a test tag for the game board.

Link copied to clipboard

Creates a test tag for a specific board cell.

Link copied to clipboard

Creates a test tag for the game page container.

Link copied to clipboard
fun testTagPiece(coordinate: Coordinate, type: PieceType?): String

Creates a test tag for a piece on the board.

Link copied to clipboard

Creates a test tag for a player's score display.

Link copied to clipboard

Creates a test tag for the target mode toggle button.

Link copied to clipboard
@Composable
fun ReversiScope.TextPlayersScore(state: GameState?)