implementing game simulation routine