Game implemented and working. Ugly code, sorry.