- topRow - Variable in class Piece
-
piece topmost row
- toString() - Method in enum Direction
-
Return a String with the single character representation of this direction.
- toString() - Method in class Piece
-
Return a String with the single display character for the piece.
- toString() - Method in class PieceMove
-
Return the String concatenation of the representations for a piece and a direction.
- toString() - Method in class RailroadRushHour
-
Return the String representation of the current puzzle state as a grid of characters that are either
(1) the character of the piece occupying the grid cell, or (2) a '+' if the grid cell is empty.
- tryMove(Direction) - Method in class Piece
-
Attempt a piece movement in a given direction, returning true or false depending on whether or not the move was successful.
- tryMove() - Method in class PieceMove
-
Tries to make the given move.
- tryMove(String) - Method in class RailroadRushHour
-
Given a move description (a length 2 String with a piece character followed by a direction character),
attempt to make the move, and return whether or not it was legal and successful.