Skip to content

Commit ee321bd

Browse files
committed
docco and code tweak
1 parent bdb4d1a commit ee321bd

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ fn main() {
350350
}
351351
```
352352

353+
## Tools
354+
355+
- [Rust playground](https://play.rust-lang.org/)
356+
353357
## Resources
354358

355359
- [Actix api framework](https://actix.rs)

game-of-life/src/game/god.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,5 @@ mod tests {
4040
}
4141

4242
pub fn is_alive(alive: bool, neighbours: i32) -> bool {
43-
if alive {
44-
if neighbours == 2 || neighbours == 3 {
45-
return true;
46-
}
47-
return false;
48-
} else {
49-
if neighbours == 3 {
50-
return true;
51-
}
52-
return false;
53-
}
43+
return alive && neighbours == 2 || neighbours == 3
5444
}

0 commit comments

Comments
 (0)