Mercurial > zrpn
changeset 65:783ad2376233
Yet another merge.
| author | "Sam Bull <sam@sambull.org>" |
|---|---|
| date | Sun, 08 Jul 2012 10:13:29 +0100 |
| parents | cc6b5dd62842 (current diff) 0a3b44b8d303 (diff) |
| children | d7d2c570f4c8 |
| files | zrpn/main.py |
| diffstat | 3 files changed, 38 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/README.rst Sun Jul 08 10:11:28 2012 +0100 +++ b/README.rst Sun Jul 08 10:13:29 2012 +0100 @@ -95,6 +95,21 @@ + +Lose points when remove a piece. +Gain points when you create a connection. +Get list of people to apply points to. (the client just before) + +SCORE packet, (score_num, high_score) + + + + + + + + + creating a source distribution ------------------------------
--- a/zrpn/board.py Sun Jul 08 10:11:28 2012 +0100 +++ b/zrpn/board.py Sun Jul 08 10:13:29 2012 +0100 @@ -81,7 +81,7 @@ x += 1 for i in xrange(x - count, x): self.board[y][i] = 0 - self.die((i, y), turn) + self.die((i, y), turn, animations) killed += 1 for x, cell in enumerate(self.board[0]): @@ -136,23 +136,24 @@ return points, checked - def kill_groups2(self, turn): - """Alternative kill_groups implementation (look for any shape)""" - GROUP_SIZE = 5 - killed = 0 - checked = [[False for i in row] for row in self.board] - for i, row in enumerate(self.board): - for j in range(len(row)): - if checked[i][j]: - continue - points, checked = self.check_neighbours(i, j, checked) - if len(points) >= GROUP_SIZE: - for point in points: - killed += 1 - y, x = point - self.board[y][x] = 0 - self.cells[y][x].die(turn) - return killed + + #def kill_groups2(self, turn): + # """Alternative kill_groups implementation (look for any shape)""" + # GROUP_SIZE = 5 + # killed = 0 + # checked = [[False for i in row] for row in self.board] + # for i, row in enumerate(self.board): + # for j in range(len(row)): + # if checked[i][j]: + # continue + # points, checked = self.check_neighbours(i, j, checked) + # if len(points) >= GROUP_SIZE: + # for point in points: + # killed += 1 + # y, x = point + # self.board[y][x] = 0 + # self.cells[y][x].die(turn) + # return killed def kill_one(self, (x, y)): animations = []
--- a/zrpn/main.py Sun Jul 08 10:11:28 2012 +0100 +++ b/zrpn/main.py Sun Jul 08 10:13:29 2012 +0100 @@ -46,12 +46,15 @@ ip = menu["ip"].text raise NotImplementedError("Add multiplayer") -menu = MainMenu(menu=("m:Main Menu", ("f:single", "Single Player"), +menu = MainMenu(menu=("m:Zombies Robots Pirates Ninjas", ("f:single", "Single Player"), ("w:input_box", "name=ip", "text=localhost", "label=Enter IP for multiplayer server"), ("f:multi", "Multiplayer"), ("f:exit", "Quit"))) def main(): + + pygame.display.set_caption("Zombies Robots Pirates Ninjas") + clock = pygame.time.Clock() menu.add(0) while True:
