Open Zomis opened 2 years ago
companion objects in Kotlin can have a name and a type, which makes them a lot nicer to refer to. See how Kotlin has done with coroutine context elements, for example: public companion object Key : CoroutineContext.Key<Job>
Simple Tic-Tac-Toe created. Will try and re-use lots to create similar games: TTTUltimate, Connect4...
Creating AIs in ECS style might be a bit more tricky, especially scoring AIs. Since the way I've done it in TTT encourages one-action-per-entity. So instead of one actionType with 9 possible actions, there is now 9 actionTypes with one action each. The actionTypes are named for example /board/1,2/play
With the power of Kotlin, it's time once again to try an Entity/Component/System approach.
Remember the decisions made and the lessons learned and try to make it as easy as possible to do it "right". Remember to fail early and fail often when something is wrong, such as trying to get a component that is not attached to an entity.
Especially remember the following: