change coordinate from double to int, add spacebar corordinate