Finished game logics. The game works in console mode. Need to reimplement testing.