Skip to content

Commit

Permalink
Updated the licence a little.
Browse files Browse the repository at this point in the history
All instances of "This program"
should be "Terminal Worm"
  • Loading branch information
MageJohn committed Jul 19, 2014
1 parent d16ca05 commit 0eac26f
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 36 deletions.
6 changes: 3 additions & 3 deletions LICENCE
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,12 @@ the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand All @@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail.
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
Terminal Worm comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

Expand Down
4 changes: 2 additions & 2 deletions classes.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down
4 changes: 2 additions & 2 deletions constants.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down
4 changes: 2 additions & 2 deletions dialogue.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down
4 changes: 2 additions & 2 deletions display_utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down
4 changes: 2 additions & 2 deletions flow_control.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down
4 changes: 2 additions & 2 deletions intro.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down
43 changes: 24 additions & 19 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand All @@ -29,6 +29,17 @@

# NB: In curses, positions are 'y,x', instead of 'x,y'

def move_handling(char):
'''This function handles movement keys'''
if char == curses.KEY_LEFT or char == ord(CONTROL_KEYS[LEFT]):
return LEFT
elif char == curses.KEY_RIGHT or char == ord(CONTROL_KEYS[RIGHT]):
return RIGHT
elif char == curses.KEY_UP or char == ord(CONTROL_KEYS[UP]):
return UP
elif char == curses.KEY_DOWN or char == ord(CONTROL_KEYS[DOWN]):
return DOWN


def main(stdscreen):
'''The main function. This is where things happen!'''
Expand Down Expand Up @@ -61,21 +72,15 @@ def main(stdscreen):
while True: # The game loop
# Event handling
char = window.getch()
if char == curses.KEY_LEFT or char == ord(CONTROL_KEYS[LEFT]):
direction = LEFT
elif char == curses.KEY_RIGHT or char == ord(CONTROL_KEYS[RIGHT]):
direction = RIGHT
elif char == curses.KEY_UP or char == ord(CONTROL_KEYS[UP]):
direction = UP
elif char == curses.KEY_DOWN or char == ord(CONTROL_KEYS[DOWN]):
direction = DOWN
elif char == ord('q'):
if flow_control.confirm_quit(window):
break
elif char == ord('p'):
flow_control.pause(window)
elif char == ord('?'):
misc_utils.help(window)
direction = move_handling(char)
if direction is not None:
if char == ord('q'):
if flow_control.confirm_quit(window):
break
elif char == ord('p'):
flow_control.pause(window)
elif char == ord('?'):
misc_utils.help(window)

snake.move(direction)

Expand Down Expand Up @@ -105,9 +110,9 @@ def main(stdscreen):
bug.display_timer(stdscreen)

if bug is not None:
# We chareck two separate times if bug is not None,
# We check two separate times if bug is not None,
# because the first time has the possibility of
# charanging bugs value.
# changing bugs value.
if snake.pos_list[0] == bug.pos:
snake.extend()
score += bug.timeout
Expand Down
4 changes: 2 additions & 2 deletions misc_utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''Terminal Worm: A remake of the classic Snake game
Copyright (C) 2012, 2013 Yuri Pieters
This program is free software: you can redistribute it and/or modify
Terminal Worm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Terminal Worm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Expand Down

0 comments on commit 0eac26f

Please sign in to comment.