39 return absl::InvalidArgumentError(
"Choose a cell inside this room.");
41 const int next = y *
kWidth + x;
43 return absl::OkStatus();
46 return absl::ResourceExhaustedError(
47 "512-cell rehearsal limit. Reset to start again.");
52 return absl::InvalidArgumentError(
53 "Choose an adjacent cell; jumps are not modeled.");
56 return absl::FailedPreconditionError(
57 "That cell is a pit. Back removes the last step.");
60 return absl::FailedPreconditionError(
61 "Only highlighted crumble cells are modeled.");
67 return absl::OkStatus();
81 for (
size_t i = 1; i <
route_.size(); ++i) {
std::array< CrumbleFloorCell, kCellCount > cells_
void Reset(const Words &words)
static constexpr int kMaxSteps
absl::Status Step(int x, int y)
std::optional< int > current() const
std::vector< int > route_
std::array< uint16_t, kCellCount > Words
static constexpr int kWidth
static constexpr int kCellCount
void Depart(CrumbleFloorCell &cell)
Editors are the view controllers for the application.
CrumbleFloorCell ClassifyCrumbleFloorWord(uint16_t word)