Added leftmost parameter to gen and go_on, works for first move but negative leftmost values appearing afterwards.