Swift implementation of Typing Battle.