c++ - Passing many variables from a function in one class to a function in another class -



c++ - Passing many variables from a function in one class to a function in another class -

i creating chess engine using bitboards , have 2 classes: class board , class evaluation.

there many variables in board class want pass function in evaluation class. class evaluates position of board , returns number. want pass bitboards class. around 15 in number , may increase.

i creating object of evaluation class in board class , board class calling boardevaluation function. function want pass these bitboards.

one way take 15 arguments in function want pass variables to. however, prefer not using approach since not sound appealing.

is there other way pass many variables 1 class function in class?

create class boarddata , utilize in both board , evaluation. responsibility of boarddata store 15 variables - , maybe provide basic operations on them. in way design simplified without circural depependencies.

c++

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -