I'm working on a chess game, and I'm creating two enumerations - for piece_color and piece_type. I'm wondering what the difference is (whether it's an actual difference in the way the program executes or a matter of good object-oriented practice) between having the enums be global or having them as public members of a piece class.


It depends on where you want the names visible and how you address them: that is, your preference.