c# rewritten flight chess code