From 9c176e4ed9840632715bd37a3ded869dcd57a328 Mon Sep 17 00:00:00 2001 From: klonfish Date: Tue, 27 Dec 2016 15:19:43 +0100 Subject: [PATCH] Changed 2 player message --- gamemenu.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/gamemenu.py b/gamemenu.py index a46aaa6..172e2a8 100755 --- a/gamemenu.py +++ b/gamemenu.py @@ -97,13 +97,21 @@ select_game = [ [0,0,1,1,0,0,1,0,1,0,1,0,0,0,1,0,1,1,0], ] -player2 = [ -[0,1,1,1,0,0,1,1,1,0,0,0,1,1,0], -[1,0,0,0,1,0,1,0,0,1,0,1,0,0,1], -[0,0,0,1,0,0,1,0,0,1,0,0,0,1,0], -[0,0,1,0,0,0,1,1,1,0,0,0,1,0,0], -[0,1,0,0,0,0,1,0,0,0,0,0,0,0,0], -[1,1,1,1,1,0,1,0,0,0,0,0,1,0,0], +player = [ +[1,1,0,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,1,1,0], +[1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1], +[1,1,0,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,1,1,0], +[1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,1], +[1,0,0,0,1,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,1], +] + +two = [ +[0,1,1,1,0,0,0,1,1,0], +[1,0,0,0,1,0,1,0,0,1], +[0,0,0,1,0,0,0,0,1,0], +[0,0,1,0,0,0,0,1,0,0], +[0,1,0,0,0,0,0,0,0,0], +[1,1,1,1,1,0,0,1,0,0], ] def copy_bitmap(bitmap, frame, color, xoffs=0, yoffs=0): @@ -125,10 +133,15 @@ def create_init_screen(dimension): def create_2player_screen(dimension): frame = blup.frame.Frame(dimension) - xoffs = (dimension.size()[0]-len(player2[0]))//2 - yoffs = (dimension.size()[1]-len(player2))//2 + xoffs = (dimension.size()[0]-len(player[0]))//2 + yoffs = 1 + color = (0, 255, 0) + copy_bitmap(player, frame, color, xoffs, yoffs) + + xoffs = (dimension.size()[0]-len(two[0]))//2 + yoffs += 1+len(two) color = (0, 255, 0) - copy_bitmap(player2, frame, color, xoffs, yoffs) + copy_bitmap(two, frame, color, xoffs, yoffs) return frame @@ -315,7 +328,7 @@ if __name__ == '__main__': init_frame = create_init_screen(dim) out.sendFrame(init_frame) - time.sleep(2) + time.sleep(1) games = Game.__subclasses__() game_idx = 0 old_idx = -1