Skip to content
Snippets Groups Projects
Verified Commit bc58c0f6 authored by Maarten van den Berg's avatar Maarten van den Berg
Browse files

Add extra short flag for --mode in online

parent 7bd2da8c
No related tags found
No related merge requests found
......@@ -87,6 +87,7 @@ def edge_algo_cmd(input_file: TextIO) -> None:
@click.argument("input_file", type=click.File(mode="r"))
@click.option(
"--mode",
"-m",
"mode_name",
type=click.Choice(online_solvers.keys()),
default="first-fit",
......@@ -98,7 +99,7 @@ def edge_algo_cmd(input_file: TextIO) -> None:
default=False,
help="Print the final Cinema when input ends?",
)
def online_cmd(input_file: TextIO, mode_name: str) -> None:
def online_cmd(input_file: TextIO, mode_name: str, print_when_done: bool) -> None:
"""
Solve an instance of the online variant of the problem.
......@@ -138,6 +139,10 @@ def online_cmd(input_file: TextIO, mode_name: str) -> None:
x, y = maybe_location
print(f"{x+1} {y+1}")
if print_when_done:
print(prettyprint_cinema(solver.cinema, DebugLetters))
print(f"Seated people: {cinema.get_amount_people_seated()}")
if __name__ == "__main__":
cli()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment