write game js