Refactor
All checks were successful
/ maven-build (push) Successful in 20s

This commit is contained in:
Manuel Friedli 2026-03-07 23:47:38 +01:00
parent 824f038084
commit 3efb87bcd8
Signed by: manuel
GPG key ID: 41D08ABA75634DA1
24 changed files with 14 additions and 19 deletions

View file

@ -1,60 +0,0 @@
import Maze from "../model/maze.ts";
export interface Action {
type: string,
[key: string]: boolean | number | string | object | null | undefined;
}
export const ID_ACTION_STARTED_LOADING = 'started_loading';
export function actionStartedLoading(): Action {
return {
type: ID_ACTION_STARTED_LOADING
}
}
export const ID_ACTION_LOADED_MAZE = 'loaded_maze';
export function actionLoadedMaze(maze: Maze): Action {
return {
type: ID_ACTION_LOADED_MAZE,
maze
}
}
export const ID_ACTION_LOADING_FAILED = 'loading_failed';
export function actionLoadingFailed(reason: string): Action {
return {
type: ID_ACTION_LOADING_FAILED,
reason
};
}
export const ID_ACTION_TOGGLED_SHOW_SOLUTION = 'toggled_show_solution';
export function actionToggledShowSolution(value: boolean): Action {
return {
type: ID_ACTION_TOGGLED_SHOW_SOLUTION,
value
}
}
export const ID_ACTION_CLOSED_MESSAGE_BANNER = 'closed_message_banner';
export function actionClosedMessageBanner(): Action {
return {
type: ID_ACTION_CLOSED_MESSAGE_BANNER
}
}
export const ID_ACTION_CLICKED_CELL = 'clicked_cell';
export function actionClickedCell(x: number, y: number): Action {
return {
type: ID_ACTION_CLICKED_CELL,
x,
y
}
}