Wrote basic game functionality