Skip to content

Lab Exercise 3 Patch Notes

Updated as of 07/30, 10:41AM

Updated template files

view.py

import os
import subprocess
import time


class GameOfLifeView:
    def __init__(self, fps: int):
        self._fps = fps

    @property
    def fps(self):
        return self._fps

    def print_grid(self, grid_display: str):
        print(grid_display)

    def clear_terminal(self):
        subprocess.run('cls' if os.name == 'nt' else 'clear')

    def sleep(self):
        time.sleep(1 / self.fps)


Sorry for the inconvenience!