factor game into separate file, move stacks into index