From 07f3f9f3bc57ff4a44630d01e63fbfef72cc3d7c Mon Sep 17 00:00:00 2001 From: TheLie0 Date: Fri, 8 Mar 2019 12:53:12 +0100 Subject: [PATCH] Made code more understandable. Commented the get_movement_score function to be more understandable. --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 12dbc12..84b69f1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,6 +119,9 @@ fn random_one_or_zero_with_cutoff_point(cutoff: f32) -> u16 { fn get_movement_score(cell: u16) -> usize { if (cell & 0b0000000001111110) == ((cell & 0b0001111110000000) >> 6) { + /*Checking the matching the last six states with the six before to find + out whether the cell is stagnant. The number six is chosen because it + encompasses all regular patterns of size 2, 3 and 6.*/ return 0; } return 1;