make output stream a Main parameter
This commit is contained in:
@@ -476,11 +476,11 @@ TEST_SUITE("2018-15 examples") {
|
||||
}
|
||||
}
|
||||
|
||||
auto Main(std::istream & in) -> void
|
||||
auto Main(std::istream & in, std::ostream & out) -> void
|
||||
{
|
||||
auto const grid {Grid::Parse(in)};
|
||||
Game game {std::move(grid)};
|
||||
//game.debug_out_ = &std::cout;
|
||||
std::cout << "Part 1: " << *Game{game}.Simulate() << std::endl;
|
||||
std::cout << "Part 2: " << Part2(std::move(game)).first << std::endl;
|
||||
//game.debug_out_ = &out;
|
||||
out << "Part 1: " << *Game{game}.Simulate() << std::endl;
|
||||
out << "Part 2: " << Part2(std::move(game)).first << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user