abstract chess in c++