reorganises code
create base for creating matrices from a game