You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code with some I/O are organized in packages with name suffix _IO
implementation code (body) are put in separate files to keep the main package body files tidy 😎
Loading of the data file
Standard library Ada.Text_IO.Bounded_IO is used to get each Data line.
Data storage
Data are first stored in arrays, so it can be manipulated easily
Each board will create 10 Sets of numbers (one per row, one per column). Numbers come from the former arrays.
To be memory friendly, Ada.Containers.Bounded_Ordered_Sets.Set is used, which is ... bounded to the max of 100 elements, and has nice features as Union and Difference.
Multi-tasking 😍
BOARD
Each board will have his own thread (task) delivering:
loading data in the 5+5 Sets
searching after a winning Set on a series of given Called Numbers
computing the end results
JURY
There is also a Jury thread (task)
accepting a Winning Board/Set
ruling for victoy (First winning board / Last winning board ) and Game Over