Separated the classes into different files. Added a check for tie games