Game7

encapsulated both functions into a self-contained function. Done.