Add .clang-format and apply it

This commit is contained in:
2021-12-02 07:18:16 +00:00
parent e58dede1b6
commit cd5e2538df
103 changed files with 2714 additions and 2132 deletions

View File

@@ -14,8 +14,10 @@ using Coord = long;
using Position = std::pair<Coord, Coord>;
using Tiles = std::set<Position>;
struct Tiler {
void flip_tile(std::string const &s) {
struct Tiler
{
void flip_tile(std::string const& s)
{
Coord x = 0;
Coord y = 0;
auto it = s.begin();
@@ -30,9 +32,11 @@ struct Tiler {
if (*it == 'e') {
x += dx;
} else if (*it == 'w') {
}
else if (*it == 'w') {
x -= dx;
} else {
}
else {
assert(false);
}
++it;
@@ -51,7 +55,8 @@ private:
Tiles black_tiles_;
};
int main(void) {
int main(void)
{
Tiler tiler;
std::string line;
while (std::getline(std::cin, line)) {