Made code more understandable.

Commented the get_movement_score function to be more understandable.
This commit is contained in:
TheLie0 2019-03-08 12:53:12 +01:00 committed by GitHub
parent 58b589af13
commit 07f3f9f3bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;