Reduced readability in the name of cool factor 😎

This commit is contained in:
Gnarwhal 2020-12-04 21:19:51 -08:00
parent 88869e639e
commit 762e5bcef3
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174

View file

@ -42,10 +42,7 @@ auto main(i32 argc, char * argv[]) -> i32 {
while (getline(file, line)) { while (getline(file, line)) {
auto local_seat = usize(0); auto local_seat = usize(0);
for (auto i = usize(0); i < 7 + 3; ++i) { for (auto i = usize(0); i < 7 + 3; ++i) {
local_seat <<= 1; local_seat = (local_seat << 1) | (line[i] == 'B' || line[i] == 'R');
if (line[i] == 'B' || line[i] == 'R') {
local_seat |= 1;
}
} }
if (local_seat > seat) { if (local_seat > seat) {
seat = local_seat; seat = local_seat;