
16 Apr
2015
16 Apr
'15
6:08 a.m.
Hi, I'm writing QuickCheck properties for the swipeLeft function in a game of 2048. I could think of 3 very basic properties so far and I'm wondering if you guys can think of any other interesting ones. Here are mine: - Verify That It Makes The Number Of Zeroes Go Up (applies "length . (filter (==0))" to both input and output and then does a <= comparison) - Verify That It Cleanly Separates Zeroes To The Right-Hand Side (applies "all (==0) . snd . break (==0)" to the output) - Verify that It Preserves The SumTotal (assert that the sum of all integers is left unchanged) -Dan
3687
Age (days ago)
3687
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dan Serban