This programming assignment is an expansion of P9.12 (p. 499-‐500). Write the class Bug but assume the bug is moving on 2-‐dimensional plane. Positions should always be expressed as a tuple of two integers (x_coord, y_coord). Your test code should exercise all parts of your code and be after
i f __name__ == "__main__":
For directions, any word beginning with N will be interpreted as North, E as East, W as West and S as South. Either case should be accepted and any other letter will be ignored. East is the direction if increasing x, north for increasing y, etc.
The following methods are expected:
d e f __init__(self, initPos = (0, 0), initDir = 'N'):