Made code more understandable.
Commented the get_movement_score function to be more understandable.
This commit is contained in:
parent
58b589af13
commit
07f3f9f3bc
1 changed files with 3 additions and 0 deletions
|
@ -119,6 +119,9 @@ fn random_one_or_zero_with_cutoff_point(cutoff: f32) -> u16 {
|
||||||
|
|
||||||
fn get_movement_score(cell: u16) -> usize {
|
fn get_movement_score(cell: u16) -> usize {
|
||||||
if (cell & 0b0000000001111110) == ((cell & 0b0001111110000000) >> 6) {
|
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 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue