-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Eduardo Narros edited this page Apr 17, 2021
·
4 revisions
- Use worker threads to avoid locking the UI.
Use immutable structures as much as possible but avoid making unnecessary copies of objects.
Optimised for accessing the current value of a square means using a stateful board backed by an array. If we use a board backed by "moves" (event sourced), it would be too slow to access the current state of a square.
Given a particular board, what are the possible moves?
Stateful vs stateless considerations, it seems that if the board is immutable, the game becomes much slower.
Could using an immutable board and multithreading algorithms significantly change how many moves can be processed?
Given a particular board and the possible moves, which move should be selected?