oers / reversatile

Reversatile: Reversi for Android
GNU General Public License v3.0
19 stars 6 forks source link

[optim] Optimize BoardViewModel/remove FieldState class and interface #48

Closed panstromek closed 6 years ago

panstromek commented 6 years ago

Basically only new information that it adds as compared to GameState is that it's remembers if field has been flipped. But ByteBoard from GameState is immutable, so BVM can just cache last ByteBoard and compare it on Demand - no 8*8 FieldState objects needed