Python Forum
conway's game of life / Single Responsibility Principle
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
conway's game of life / Single Responsibility Principle
#8
That is just a capitalization error.  We were having issues with our forum code tags a week ago where they made everything lowercase.

Make sure your function looks like this:
def bind_keys(canvas):
    """Bind all appropriate keys to the correct function."""
    bindings = {"<KeyPress-Up>" : movesquare, "<KeyPress-Down>": movesquare,
                "<KeyPress-Left>": movesquare, "<KeyPress-Right>": movesquare,
                "x": otherkey}
    for binding in bindings:
        canvas.bind_all(binding, bindings[binding]) 
Reply


Messages In This Thread
RE: conway's game of life / Single Responsibility Principle - by Mekire - Dec-16-2016, 02:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  While loop/half-life Miraclefruit 6 8,555 Mar-06-2017, 05:24 PM
Last Post: nilamo
  conway's game of life hanscvanleeuwen 17 18,009 Dec-09-2016, 04:05 PM
Last Post: hanscvanleeuwen
  Game of life using IDLE Informatics109 4 5,147 Oct-29-2016, 01:39 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020